<script>var temp=document.form1.select2;function redirect(x){var i;i=0;for (var m=temp.options.length-1;m>0;m--)temp.options[m]=null;<%while not rs2.eof%>cnt=<%=rs2("address")%>;if(cnt==x){temp.options=new Option("<%=rs2("address")%>","<%=rs2("address")%>");i=i+1;}<%rs2.movenextwend%>}</script>大意是做一個級聯菜單,2個select第一個select的選項通過讀數據庫來獲得,而第二個select的option根據第一個的選項做匹配,可這段代碼執行的時候頁面上有錯誤,我想是在js中嵌套asp代碼有問題,請高手給予指教,先謝謝了!
我想是在js中嵌套asp代碼有問題?請問該怎么解決?
慕哥6287543
2022-05-24 15:11:48