The query result of the html tag select is displayed in the top menu.

Source: Internet
Author: User
The query result of the html tag select is displayed in the html & nbsp; select drop-down menu, for example, & lt; select & nbsp; name = 'name' & gt; & nbsp; & lt; option & nbsp; value = html tag select problem data query result is displayed in the drop-down menu
In the html select drop-down list, you can manually add a menu, for example

Value 1
Value 2
Value 3


Now the result of my query from the database is 2. how can I automatically lock the drop-down menu in "value 2" when the page is displayed? Select html data display
------ Solution --------------------

Value 1
Value 2
Value 3

$ Value = 2;
Echo "script document. getElementById ('name'). value = $ 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.