</script>
<script type="text/javascript">
//页面的初始化
function DropDownList1Changed() {
companyid = $("#DropDownList1").val();
$("#DropDownList2").empty();
$("<option value='0'>--Please-select--</option>").appendTo($("#DropDownList2"));
$("#DropDownList3").empty();
$("<option value='0'>--Please-select!--</option>").appendTo($("#DropDownList3"));
$.ajax({
type: 'post',
url: 'DropDownHelper.aspx?type=' + companyid,
data: "",
success: function (data) {
var str = data.split("|");
var st = "";
var i = 0;
for ( i = 0; i < str.length; i++) {
if (i == 0) {
var st1 = str[0].split("\"");
st1[1] = "\"" + st1[1] + "\""
st = st1[1].split(":");
} else {
st = str[i].split(":");
}
$("<option value='" + st[1].replace("\"", "") + "'>" + st[0].replace("\"", "") + "</option>").appendTo($("#DropDownList2"));
}
}
});
}
function DropDownList2Changed() {
warehouseid = $("#DropDownList2").val();
$("#DropDownList3").empty();
$("<option value='0'>--Please-select!--</option>").appendTo($("#DropDownList3"));
$.ajax({
type: 'post',
url: 'DropDownHelper2.aspx?type1=' + warehouseid,
data: {},
success: function (data) {
var str = data.split("|");
var st = "";
var i = 0;
for (i = 0; i < str.length; i++) {
if (i == 0) {
var st1 = str[0].split("\"");
st1[1] = "\"" + st1[1] + "\""
st = st1[1].split(":");
} else {
st = str[i].split(":");
}
$("<option value='" + st[1].replace("\"", "") + "'>" + st[0].replace("\"", "") + "</option>").appendTo($("#DropDownList3"));
}
}
});
}
</script>
上面是script下面相应的插件
<table>
<tr>
<td align="right">
C:
</td>
<td align="left">
<asp:DropDownList ID="DropDownList1" runat="server" onchange="DropDownList1Changed()" Height="20px" style="margin-left: 0px" Width="160px">
</asp:DropDownList>
</td>
<td align="right">
W:
</td>
<<td align="left">
<asp:DropDownList ID="DropDownList2" runat="server" onchange="DropDownList2Changed()" Height="20px" Width="160px">
</asp:DropDownList>
</td>
<td align="right" class="style22">
S:
</td>
<td align="left">
<asp:DropDownList ID="DropDownList3"
selected="Tools type" runat="server" Height="21px"
style="margin-left: 0px" Width="160px">
</asp:DropDownList>
</td>
</tr>
</table>
815

被折叠的 条评论
为什么被折叠?



