Level 2 Association menu

Source: Internet
Author: User
<Form name = "doublecombo">
<P>
<Select name = "example" size = "1" onchange = "Redirect (this. Options. selectedindex)">
<Option> Foreign javascript technology websites </option>
<Option> domestic javascript technology website </option>
<Option> famous foreign search engines </option>
</SELECT>
<Select name = "stage2" size = "1">
<Option value = "http://wsabstract.com"> website action </option>
<Option value = "http://www.dynamicdrive.com"> dynamicdrive.com </option>
<Option value = "http://javascript.internet.com"> JavaScript </option>
</SELECT>
<Input type = "button" name = "test" value = "Go! "Onclick =" Go () ">
</P>
</Form>

<SCRIPT>
<! --
VaR groups = Document. doublecombo. example. Options. Length
VaR group = new array (groups)
For (I = 0; I <groups; I ++)
Group [I] = new array ()
Group [0] [0] = New Option ("website failed action", "http://wsabstract.com ")
Group [0] [1] = New Option ("dynamicdrive.com", "http://www.dynamicdrive.com ")
Group [0] [2] = New Option ("JavaScript", "http://javascript.internet.com ")

Group [1] [0] = New Option ("Wan Xu JavaScript repository", "http://www.wanxu.com ")
Group [1] [1] = New Option ("javascript2000", "http://www.javascript2000.com ")
Group [1] [2] = New Option ("Carefree script", "http://www.51js.com ")

Group [2] [0] = New Option ("Hotbot", "http://www.hotbot.com ")
Group [2] [1] = New Option ("infoseek", "http://www.infoseek.com ")
Group [2] [2] = New Option ("excite", "http://www.excite.com ")
Group [2] [3] = New Option ("Lycos", "http://www.lycos.com ")

VaR temp = Document. doublecombo. stage2
Function redirect (X)
{
For (M = temp. Options. Length-1; m> 0; m --)
Temp. Options [m] = NULL
For (I = 0; I <group [X]. length; I ++)
{
Temp. Options [I] = New Option (group [x] [I]. Text, group [x] [I]. value)
}
Temp. Options [0]. Selected = true
}
Function go ()
{
Location = temp. Options [temp. selectedindex]. Value
}
// -->
</SCRIPT>

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.