获取不了联动下拉框的值?谁来帮下,最好帮我测试下,我测试了一天了,怎么都不行?
- HTML code
<!--#include file="conn.asp"--> <% action = request("action") %> <% if session("Number") = "" or session("Password") = "" then %> <script>alert('你还没有登录呢');</script> <%response.Redirect("logout.asp")%> <% else %> <% IF Request("delid")<>"" Then Sql = "Delete From SysUser Where Number="&Request("delid") Conn.Execute(Sql) End IF %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="css.css" rel="stylesheet" type="text/css"> <style> td{font-size:9pt;line-height:120%;color:#353535} body{font-size:9pt;line-height:120%} a:link { color: #000000; text-decoration: none } a:visited { color: #000000; text-decoration: none } a:active { color: #000000; text-decoration: none } a:hover { color: #336699; text-decoration: none; position: relative; right: 0px; top: 1px } </style> </head> <% qxcnc_code = session("Number") qxcnc_ji = session("CategoryID") if qxcnc_ji = 8 then %> <body bgcolor="#799AE1"> <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF" vspace="0" hspace="0"> <tr> <td width="4%" height="27" valign="middle" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">.:: </td> <td width="12%" align="center" valign="middle" background="images/admin_bg_1.gif" bgcolor="#CCCCCC"><a href="admin_pass.asp"><img src="images/reload.gif" width="59" height="16" border="0"></a></td> <td align="center" valign="baseline" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">[<a href="admin_pass.asp">用户管理</a>]</td> <td align="center" valign="baseline" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">[<a href="admin_jgh.asp">机构管理</a>]</td> <td align="center" valign="baseline" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">[<a href="admin_bh.asp">编号管理</a>]</td> </tr> </table> <table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#00659C"> <form action="admin_pass_add.asp" method="post" name="form_class_add"> <tr align="center"> <td><font color="#FFFFFF"><strong><font color="#FFFFFF">用户编号</font></strong></font></td> <td><strong><font color="#FFFFFF">用户姓名</font></strong></td> <td width="11%"><font color="#FFFFFF"><strong><font color="#FFFFFF">用户</font>密码</strong></font></td> <td width="11%"><font color="#FFFFFF"><strong><font color="#FFFFFF">用户</font>身份证</strong></font></td> <td width="12%"><font color="#FFFFFF"><strong>所属支行</strong></font></td> <td width="17%"><font color="#FFFFFF"><strong>所属网点</strong></font></td> <td width="9%"><font color="#FFFFFF"><strong>用户类别</strong></font></td> <td width="14%"><font color="#FFFFFF"><strong>操作</strong></font></td> </tr> <tr align="center" bgcolor="#FFFFFF"> <td width="11%"><input name="Number" onFocus="this.value=''" type="text" id="UserNumber" size="15"></td> <td width="11%"><input name="UserName" onFocus="this.value=''" type="text" id="Name" size="15"></td> <td><input name="Password" onFocus="this.value=''" type="password" id="UserPassword" size="15"></td> <td width="11%"><input name="IdentityCard" onFocus="this.value=''" type="text" id="UserIdentity" size="15"></td> <td> <% set rs1=server.CreateObject("adodb.recordset") sql1="select * from SubBranch" rs1.open sql1,conn,1,3 %> <select name="type" size="1" onChange="redirect(this.options.value);"> <option value="0">--支行--</option> <%while not rs1.eof%> <option value="<%=rs1("SubBranchID")%>"><%=rs1("SubBranchName")%></option> <%rs1.movenext wend%> </select> </td> <td> <% set rs2=server.CreateObject("adodb.recordset") sql2="select * from Stipple" rs2.open sql2,conn,1,3%> <select name="as" size="1"> <option value="0">--网点--</option> </select> </td> <td><select name="CategoryID" size="1" id="CategoryID"> <option value="0">----</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> </select></td> <td width="14%"><input type="submit" name="Submit" value="增加用户"></td> </tr> </form> </table> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="2" bordercolor="#CCCCCC" bgcolor="#006699"> <tr> <td width="16%" height="21" align="center"><font color="#FFFFFF">用户类别划分:</font></td> <td width="84%"><font color="#FFFFFF"> 1 网点经办人 2 网点会计 3 网点主任</font></td> </tr> <tr> <td> </td> <td><font color="#FFFFFF"> 4 支行行长 5 分行经办人 6 分行部门负责人 7 分行行长</font></td> </tr> <tr> <td> </td> <td><font color="#FFFFFF">8 系统管理员</font></td> </tr> </table> <% else %> <table width="100%" border="0" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF" vspace="0" hspace="0"> <tr> <td height="27" valign="middle" background="images/admin_bg_1.gif" bgcolor="#CCCCCC">.:: <font color=red><%=session("UserName")%>: 抱歉,您没有权限增删用户,有什么问题请联系系统管理员</font> </td> </tr> </table> </form> </body> <% end if %></html> <% end if %> </div> <!--下面为分级菜单的script语句--> <script language="javascript"> var temp=document.form_class_add.as 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("SubBranchID")%>" if(cnt==x) { temp.options[i]=new Option("<%=rs2("StippleName")%>","<%=rs2("StippleID")%>") i=i+1} <% rs2.movenext wend%> } </script>