<html>
<head>
<script language="javascript">
var curValue;
optionList = new Array();
optionList["jh"] = new Array("a","b","c");
optionList["cs"]= new Array("x","y","z");
optionList["dy"]= new Array("1","2","3");
function ChangeOptions(obj)
{
if (obj.value != curValue)
{
curValue = obj.value;
document.form1.shebei.options.length = 0;
for (var i=0; i < optionList[curValue].length; i++)
{
var opt = new Option(optionList[curValue][i],optionList[curValue][i]);
document.form1.shebei.options[i] = opt;
}
}
}function init()
{
ChangeOptions(document.form1.bumen);
}
</script>
</head>
<body onload="init()">
<form name="form1"><select name="bumen" onchange="ChangeOptions(this)">
<option value="jh">交换维护中心</option>
<option value="cs">传输维护中心</option>
<option value="dy">电源维护中心</option>
</select><select name="shebei">
</select>
</form>
</body>
</html>
<head>
<script language="javascript">
var curValue;
optionList = new Array();
optionList["jh"] = new Array("a","b","c");
optionList["cs"]= new Array("x","y","z");
optionList["dy"]= new Array("1","2","3");
function ChangeOptions(obj)
{
if (obj.value != curValue)
{
curValue = obj.value;
document.form1.shebei.options.length = 0;
for (var i=0; i < optionList[curValue].length; i++)
{
var opt = new Option(optionList[curValue][i],optionList[curValue][i]);
document.form1.shebei.options[i] = opt;
}
}
}function init()
{
ChangeOptions(document.form1.bumen);
}
</script>
</head>
<body onload="init()">
<form name="form1"><select name="bumen" onchange="ChangeOptions(this)">
<option value="jh">交换维护中心</option>
<option value="cs">传输维护中心</option>
<option value="dy">电源维护中心</option>
</select><select name="shebei">
</select>
</form>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货