复制代码代码如下:
<!-#includefile = "conn.asp"->
<html>
<head>
<metahttp-equiv = "content-type" content = "text/html ؛ charset = gb2312">
<TENAME = "Generator" content = "MicrofftfrontPage4.0">
<TENAME = "progid" content = "frontpage.editor.document">
<title> newPage1 </itlem>
</head>
<body>
<٪
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 (" id ("id")))) ؛
<٪
العد = العد+1
Rs.Movenext
حلقة
Rs.close
٪>
OneCount = <٪ = count ٪> ؛
وظيفة changelocation (موقع)
{
document.form1.cid.length = 0 ؛
varlocationId = locationId ؛
vari
لـ (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.selectedIndex] .value)"> <٪
dowhilenotrs.eof
٪> <PointSelectedValue = "<٪ = trim (rs (" id ")) ٪>"> <٪ = trim (rs ("shengname)) ٪> </potion>
<٪
Rs.Movenext
حلقة
Endif
Rs.close
٪>
</select>