How can I select option from select To Go To The JS Code on the corresponding data page?

Source: Internet
Author: User
<  Select  Onchange  = "Selected (this )"  >                  <  Optgroup  Label  = ""  >                  <  Option  Value  = "Http://www.glambox.com/apple"  > Apple </ Option  >                </  Optgroup  >                              <  Optgroup  Label  = "B"  >                <  Option  Value  = "Http://www.glambox.com/burberry"  > Burberry </ Option  >             </  Optgroup  >                              <  Optgroup  Label  = "C"  >             <  Option  Value  = "Http://www.glambox.com/index.php? Route = product/Manufacturer/info & amp; manufacturer_id = 9"  > Canon</  Option  >           </  Optgroup  >                            <  Optgroup  Label  = "D"  >                      <  Option  Value  = "Http://www.glambox.com/demo"  > Demo</  Option  >                </  Optgroup  >                              </  Select  > 

This generationCodeYou must click the corresponding connection to jump to the corresponding page. The JS Code is as follows:

<Script> FunctionSelected (o) {location. href=O. value ;}</Script> 

The preceding SELECT statement can also be written in this way.

<Select onchange = "location. href = This. Value">

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.