复制代码代码如下:
<!-#includeFile = "conn.asp"->
<html>
<Evista>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<metaname = "generador" content = "MicrosoftFrontPage4.0">
<metaname = "progid" content = "frontPage.editor.document">
<title> NewPage1 </title>
</ablo>
<Body>
<%
dimrs
dimsql
dimcount
setrs = server.createObject ("ADODB.Recordset")
sql = "select*fromShiinfoorderbyidasc"
Rs.opensql, Conn, 1,1
%>
<ScriptLanguage = "javaScript">
varonecount;
Onecount = 0;
subcat = newArray ();
<%
recuento = 0
dowhilenotrs.eof
%>
subcat [<%= count%>] = newArray ("<%= trim (rs (" shiname ")%>", "<%= trim (rs (" shengcode "))%>", "<%= trim (rs (" id "))%>");
<%
recuento = recuento+1
Rs.Movenext
bucle
rs.
%>
oneCount = <%= count%>;
FunctionChangeLocation (ubicación)
{
document.form1.cid.length = 0;
varLocationId = UbocationId;
vari;
para (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
Respuesta.WRITE "请先添加省份。"
respuesta.
demás
%>
<SelectName = "Sid" onChange = "ChangeLocation (document.form1.sid.options [document.form1.sid.selectedIndex] .value)"> <%
dowhilenotrs.eof
%> <OptionsElectedValue = "<%= trim (rs (" id "))%>"> <%= trim (rs ("shengname"))%> </opción>
<%
Rs.Movenext
bucle
endif
rs.
%>
</Select>