Copy Code code as follows:
<!--#include file= "conn.asp"-->
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<meta name= "generator" content= "Microsoft FrontPage 4.0" >
<meta name= "ProgId" content= "FrontPage.Editor.Document" >
<title>new Page 1</title>
<body>
<%
Dim rs
Dim sql
Dim count
Set Rs=server.createobject ("Adodb.recordset")
sql = "SELECT * from Shiinfo ORDER by ID ASC"
Rs.Open sql,conn,1,1
%>
<script language= "JavaScript" >
var Onecount;
onecount=0;
subcat = new Array ();
<%
Count = 0
Do as not rs.eof
%>
SUBCAT[<%=COUNT%>] = new Array ("<%= Trim (rs (" Shiname "))%>", "<%= Trim (rs (" Shengcode "))%>", "<%= Trim (RS ("id"))%> ");
<%
Count = Count + 1
Rs.movenext
Loop
Rs.close
%>
onecount=<%=count%>;
function Changelocation (LocationID)
{
document.form1.cid.length = 0;
var Locationid=locationid;
var i;
For (I=0;i < onecount; i++)
{
if (subcat[i][1] = = LocationID)
{
Document.form1.cid.options[document.form1.cid.length] = new Option (subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT>
<script language= "JavaScript" >
<!--
function Checkform ()
{
Document.form1.txtcontent.value=document.form1.doc_html.value;
return True
}
-->
</SCRIPT>
<form name=form1 onsubmit= "check ()" >
Province <%
sql = "SELECT * FROM Shenginfo"
Rs.Open sql,conn,1,1
If rs.eof and Rs.bof then
Response.Write "Please add the province first. "
Response.End
Else
%>
<select name= "Sid" Onchange= "Changelocation (Document.form1.sid.options[document.form1.sid.selectedindex). Value) "><%
Do as not rs.eof
%><option selected Value= "<%=trim (RS (" id ")%>" ><%=trim (RS ("Shengname"))%></option>
<%
Rs.movenext
Loop
End If
Rs.close
%>
</Select>
City: <select name= "CID" >
<option selected value= "" >== Please select City ==</option>
</Select>
</form>
</body>