Detailed explanation of how Html Select option makes default selection

高洛峰
Release: 2017-03-06 15:33:58
Original
2215 people have browsed it

Html Select The default selection is very simple. You only need to add the selected = selected attribute to an option to make it the default option. There is an example below. You may wish to refer to it. Adding the selected = "selected" attribute to an option is the default option

For example:

The code is as follows:

<select id="isAudit" name="isAudit"> 
<option value="2">全部</option> 
<option value="1" selected = "selected">通过</option> 
<option value="0">未通过</option> 
</select>
Copy after login


Then "pass" is the default Selected.

For more detailed explanations on how to make the default selection of Html Select option, please pay attention to the PHP Chinese website for related articles!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template