<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
strScript="<script language = JavaScript>"
strScript=strScript+"var onecount;"
strScript=strScript+"onecount=0;"
strScript=strScript+"subcat = new Array();"
dim rs3,x,Bclass
set rs3=server.createobject("adodb.recordset")
sql="select * from Small_Class"
rs3.open sql,myConn
x=0
do while not rs3.eof
strScript=strScript+"subcat["&x&"] = new Array('"&rs3("Bclass")&"','"&rs3("Aclass")&"');"
rs3.movenext
x=x+1
loop
strScript=strScript+"onecount=150;"
strScript=strScript+"function changelocation(locationid)"
strScript=strScript+"{"
strScript=strScript+" document.myform.smallclass.length = 0;"
strScript=strScript+" var locationid=locationid;"
strScript=strScript+" var i;"
strScript=strScript+" for (i=0;i < onecount; i++)"
strScript=strScript+" {"
strScript=strScript+" if (subcat[1] == locationid)"
strScript=strScript+" { "
strScript=strScript+" document.myform.smallclass.options[document.myform.smallclass.length] = new Option(subcat[0], subcat[2]);"
strScript=strScript+" }}}"
strScript=strScript+"</script>"
Response.Write strScript
rs3.close
%>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="776" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#c6dfde" class="myTable">
<tr>
<td valign="top">
<div align="center"><br>
<font color="#006666"><strong>录 入 信 息</strong></font><br>
<br>
<%
id=Request.QueryString("id")
set rs=server.createobject("adodb.recordset")
sql="select * from product where id='"&id&"'"
rs.open sql,myConn,3,3
%>
</div>
<table width="100%" height="95%" border="1" align="center" cellpadding="5" cellspacing="0" class="L15">
<form name="myform" method="post" action="">
<tr>
<td colspan="2"> <div align="center">产 品 编 号:
<input name="bh" type="text" id="bh2" value="<%=rs("PID")%>" size="10">
一 级 分类:
<select name="bigclass" id="select" onChange="changelocation(document.myform.bigclass.options[document.myform.bigclass.selectedIndex].value)">
<option value="<%=rs("Big_Class")%>" selected><%=rs("Big_Class")%></option>
<%
set rs1=server.createobject("adodb.recordset")
sql="select * from Big_Class order by Big_ClassID asc"
rs1.open sql,myConn,3,3
if rs1.eof then
%>
<option value="">没有其他分类</option>
<%
else
rs1.movenext
do while not rs1.eof %>
<option value="<%=rs1("Aclass")%>"><%=rs1("Aclass")%></option>
<%
rs1.movenext
loop
rs1.close
end if
%>
</select>
二 级分 类:
<select name="smallclass" id="select2">
<option value="<%=rs("Small_Class")%>" selected><%=rs("Small_Class")%></option>
</select>
</div></td>
</tr>
</table>
</body>
</html>