复制代码代码如下:
<! - #includefile =“ conn.asp” - >
<html>
<头>
<metahttp-equiv =“ content-type” content =“ text/html; charset = gb2312”>
<metaname =“ generator” content =“ microsoftFrontPage4.0”>
<metaname =“ progid” content =“ frontpage.editor.document”>
<title> newpage1 </title>
</head>
<身体>
<%
dimrs
DIMSQL
DIMCOUNT
setrs = server.createobject(“ adodb.recordset”)
sql =“ select*fromshiinfoorderbyidasc”
Rs.Opensql,Conn,1,1
%>
<ScriptLanguage =“ JavaScript”>
VaroneCount;
onecount = 0;
subcat = newarray();
<%
计数= 0
dowhilenotrs.eof
%>
subcat [<%= count%>] = newarray(“ <%= trim(rs(“ shiname”)%>”,“” <%= trim(rs(“ shengcode”))%>“,” <%= trim(rs(rs(id id'id'id'id')));
<%
计数=计数+1
Rs.Movenext
环形
Rs.Close
%>
onecount = <%= count%>;
功能ChangeLocation(位置ID)
{
document.form1.cid.length = 0;
varlationId = locationId;
vari;
for(i = 0; i <onecount; i ++)
{
if(subcat [i] [1] == locationid)
{
document.form1.cid.options [document.form1.cid.length] = newoption(subcat [i] [0],subcat [i] [2]);
}
}
}
</script>
<ScriptLanguage =“ JavaScript”>
<! -
functionCheckform()
{
document.form1.txtcontent.value = document.form1.doc_html.value;
返回
}
// - >
</script>
<formName = form1onsubmit =“ check()”>
省份<%
sql =“ select*fromshenginfo”
Rs.Opensql,Conn,1,1
ifrs.eofandrs.bofthen
响应。写入“请先添加省份。”
响应
别的
%>
<selectName =“ sid” onChange =“ changeLocation(document.form1.sid.options [document.form1.sid.seledectexex] .value)。
dowhilenotrs.eof
%> <optionsElectectectValue =“ <%= trim(rs(“ id”))%>“> <%= trim(rs(“ shengname”))%> </option>
<%
Rs.Movenext
环形
Endif
Rs.Close
%>
</select>