复制代码代码如下:
<! - #includefile = "conn.asp" - >
<html>
<head>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<metaname = "generator" content = "microsoftfrontpage4.0">
<metaname = "progid" content = "frontpage.editor.document">
<title> newPage1 </title>
</head>
<body>
<%
薄暗い
dimsql
薄暗い
setrs = server.createObject( "adodb.recordset")
sql = "select*fromshiinfoorderbyidasc"
rs.opensql、conn、1,1
%>
<ScriptLanguage = "JavaScript">
varonecount;
onecount = 0;
subcat = newArray();
<%
count = 0
dowhileenotrs.eof
%>
subcat [<%= count%>] = newArray( "<%= trim(rs(" shiname "))%>"、 "<%= trim(rs(" shengcode "))%>"、 "<%= trim(" id "))%>");
<%
count = count+1
rs.movenext
ループ
rs.close
%>
onecount = <%= count%>;
functionchangelocation(locationID)
{
document.form1.cid.length = 0;
varlocationid = 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;
returntrue
}
//->
</script>
<formname = form1onsubmit = "check()">
省份<%
sql = "select*fromshenginfo"
rs.opensql、conn、1,1
ifrs.eofandrs.bofthen
Response.Write "请先添加省份。"
Response.End
それ以外
%>
<selectname = "sid" onchange = "changelocation(document.form1.sid.options [document.form1.sid.selectedindex] .value)"> <%
dowhileenotrs.eof
%> <optionselectedValue = "<%= trim(rs(" id "))%>"> <%= trim(rs( "shengname"))%> </option>
<%
rs.movenext
ループ
endif
rs.close
%>
</select>