More ASP cascading menu effects codes used on the Internet

Source: Internet
Author: User
Tags microsoft frontpage

CopyCode The Code is as follows: <! -- # Include file = "conn. asp" -->
<HTML>
<Head>
<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>
</Head>
<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 while 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]);
}
}
}




province <%
SQL =" select * From shenginfo "
Rs. open SQL, Conn, 1, 1
If RS. EOF and Rs. bof then
response. write "add a province first. "
response. end
else
%>
<% do while not Rs. EOF %> "> <% = trim (RS ("shengname ")) %> <% Rs. movenext loop end if Rs. close %>
city: == select city ==


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.