67,513
社区成员
发帖
与我相关
我的任务
分享
test.jsp
<form name=test>
<select name=a onchange="change()">
<option value=1>ONE</option>
<option value=2>TWO</option>
<option value=3>THREE</option>
<select>
<select name=b></select>
</form>
<XML id=xmldso></XML>
<script>
function change(){
xmldso.async = false;
xmldso.load("data.jsp?id="+document.test.a.value);
with(document.test.b){
xmldso.recordset.MoveFirst();
for (var i=0;!xmldso.recordset.eof;i++){
length=i+1;
options[i].value=xmldso.recordset.fields(0).value;
options[i].text=xmldso.recordset.fields(1).value;
xmldso.recordset.MoveNext();
}
}
}
change();
</script>