<html>
<head>
<script type="text/javascript" >
function select1change() {
var s = document.getElementById("Select1");
var s2 = document.getElementById("Select2");
if (s.selectedIndex == 0)
s2.innerHTML = "<option>1</option>";
if (s.selectedIndex == 1)
s2.innerHTML = "<option>2</option>";
if (s.selectedIndex == 2)
s2.innerHTML = "<option>3</option>";
}
</script>
</head>
<body>
<select id="Select1" onchange="select1change()" >
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<select id="Select2">
<option>1</option>
<option>11</option>
<option>111</option>
<option>1111</option>
</select>
</body>
</html>
IE下当Select1的SelectedIndex改变后,Select2成空的了。而Firefox运行正常。
哪位高手指点一下。