Asp两级联动
var onecount
onecount = 0;
subcat = new Array();
Subcat[0] =新数组(" 1 "," first "," top ");
Subcat[1] =新数组(" 2 ","秒","顶");
Subcat[2] =新数组(" 1 "," first "," bottom ");
Subcat[3] =新数组(" 2 ","秒","底");
Subcat[4] =新数组(" 3 ","第三","底部");
Subcat[5] =新数组(" 4 ","第四","底部");
onecount = 6;//联动功能
函数更改位置(locationid)
{
document . my form . a order . length = 0;
var locationid = locationid
var I;
for(I = 0;我& ltonecounti++)
{
if (subcat[i][2] == locationid)
{
//var new Option 1 = new Option(subcat[I][1],subcat[I][0]);
//document . all . ctype . add(new option 1);
document . my form . a dorder . options[document . my form . a dorder . length]= new Option(subcat[I][1],subcat[I][0]);
}
}
}
& lt/script & gt;
& ltselect name = " Adress " id = " Adress " onchange = " change location(document . my form . Adress . options[document . my form . Adress . selectedindex])。值)" & gt
& lt选项& gt请选择
& ltOption value= "top " >顶部
& lt选项值= "bottom " >底部
& lt/select & gt;
& ltselect name = " Adorder " >
& lt选项& gt请选择
& lt/select & gt;其中JS下面一段可以用asp函数调用,查询输入二级检查表onecount = 0;
subcat = new Array();
Subcat[0] =新数组(" 1 "," first "," top ");
Subcat[1] =新数组(" 2 ","秒","顶");
Subcat[2] =新数组(" 1 "," first "," bottom ");
Subcat[3] =新数组(" 2 ","秒","底");
Subcat[4] =新数组(" 3 ","第三","底部");
Subcat[5] =新数组(" 4 ","第四","底部");
onecount = 6;//联动功能