<% response.write ""&vbCrlf strJS="function classselect(obj){for (var i=document.refer.class_c_id.options.length;i>=0;i--){document.refer.class_c_id.options[i]=null;"&vbCrlf '清除原有option对象的JS代码 sql="select class_id,class_name from class order by class_order" set rs=conn.execute(sql) while not rs.eof response.write " if class_id<>"" then if rs("class_id")=CInt(class_id) then '使相对应的父类的option上为selected。一定加CInt函数,否则不行 response.write " selected " end if end if response.write ">"&rs("class_name")&""&vbCrlf strJS=strJS&"}"&vbCrlf&"if (obj.options[obj.selectedIndex].value=="&rs("class_id")&"){"&vbCrlf sql1="select class_c_id,class_c_name from class_c where class_id="&rs("class_id")&" order by class_c_order" set rs1=conn.execute(sql1) while not rs1.eof strJS=strJS&"document.refer.class_c_id.options[document.refer.class_c_id.options.length]=new Option('"&rs1("class_c_name")&"','"&rs1("class_c_id")&"');"&vbCrlf rs1.movenext wend rs.movenext wend '为了使第一个子类的option不为空==================================================== if class_id="" then sql="select class_id,class_name from class" set rs=conn.execute(sql) sql="select class_c_id,class_c_name from class_c where class_id="&rs("class_id")&" order by class_c_order" else sql="select class_c_id,class_c_name from class_c where class_id="&class_id&" order by class_c_order" end if set rs=conn.execute(sql) while not rs.eof if class_c_id<>"" then if rs("class_c_id")=CInt(class_c_id) then '使相对应的子类的option上为selected。if放在字符串连接前面 strJS3="var option_length=document.refer.class_c_id.options.length;"&vbCrlf strJS2="document.refer.class_c_id.options[option_length].selected=true;"&vbCrlf else strJS3="" end if end if strJS1=strJS1&strJS3&"document.refer.class_c_id.options[document.refer.class_c_id.options.length]=new Option('"&rs("class_c_name")&"','"&rs("class_c_id")&"');"&vbCrlf rs.movenext wend '================================================================================== strJS=strJS&"}"&vbCrlf&"}"& vbCrlf response.write " " response.write "" response.write "" response.write ""&vbCrlf conn.close set conn=nothing %>
原神星蕈哪里多-星蕈采集路线分享
明末渊虚之羽赤汞晶石有什么用 赤汞晶石用途介绍
多重人生吉他怎么制作 制作吉他方法分享
明末渊虚之羽道士令牌怎么获取 道士令牌获取方法
诛仙2天外来仙怎么触发 天外来仙奇遇攻略
多重人生最大天数是固定的吗 游戏天数介绍
超能小特工
蜘蛛人大逃亡
老铁大闯关
像素世界乱斗
来个甜甜圈
甜甜圈乐园带你体验开甜品店的快乐!开一家自己的小店,从零开始
等你来挑战
等你来挑战带你进入由方块构成的立体世界,泥土、石头、木头等材
打工模拟器
打工模拟器这游戏挺有意思,让你体验超市收银员的日常。不仅要给
快速农场
快速农场玩起来特别省事,不用一直盯着也能经营好农场。任务可以
健身点击器2
健身点击器2这个游戏挺有意思的,主要就是控制做各种锻炼动作。