复制代码代码如下:
<!-#incluirfile = "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 </ititle>
</head>
<Body>
<%
Dimrs
dimsql
DimCount
setrs = server.createObject ("adodb.recordset")
sql = "Selecione*Fromshiinfoorderbyidasc"
Rs.opensql, Conn, 1,1
%>
<ScriptLanguage = "javascript">
VaroneCount;
ONECOUNT = 0;
subcat = newArray ();
<%
contagem = 0
Dowhilenotrs.eof
%>
subcat [<%= count%>] = newArray ("<%= trim (rs (" shiname "))%>", "<%= trim (rs (" shengcode "))%>", "<%= trim (rs (" id "))%>");
<%
contagem = contagem+1
rs.movenext
laço
rs.close
%>
OneCount = <%= contagem%>;
FunctionChangelocation (LocationId)
{
document.form1.cid.length = 0;
varlocationId = LocationId;
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 = "Selecione*FromShenginfo"
Rs.opensql, Conn, 1,1
ifrs.eofandrs.bofthen
Response.Write "请先添加省份。"
resposta.END
outro
%>
<SelectName = "sid" onchange = "changelocation (document.form1.sid.options [document.form1.sid.lectectedindex] .value)"> <%
Dowhilenotrs.eof
%> <OptionselectedValue = "<%= Trim (rs (" id "))%>"> <%= TRIM (rs ("shengname"))%> </pption>
<%
rs.movenext
laço
endif
rs.close
%>
</leclect>