"Reprint please retain the integrity of the content of the Wind network article, if you do not comply with this principle, we will retain the right to pursue legal responsibility"
<option> Label
Definitions and usage
<option> label defines an option in the Drop-down list.
Differences between HTML 4.01 and HTML 5
,<option> tags are also used in the new element <datalist> in HTML 5.
Tips and comments
Wind Network (www.ithov.com) Note:<option> tags can be used without any attributes, but often require http://www.aliyun.com/zixun/aggregation/9541.html " >value property that defines the data that is sent to the server.
Wind Network (www.ithov.com) Note: Please use in conjunction with <select> or <datalist> tags. ,<option> tags are meaningless elsewhere.
Example
<select>
<option value= "Volvo" >Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Opel" Selected= "selected" >Opel</option>
<option value= "Audi" >Audi</option>
</select>
Property
Property Value Description 4 5 disabled Disabled Specify that this option should be disabled on first load. 4 5 Label text defines the callouts used when using <optgroup>. 4 5 Selected selected the specified option (when first displayed in the list) is displayed as selected. 4 5 Value text defines the option values to be sent to the server. 4 5
Standard properties
Class, Contenteditable, ContextMenu, dir, draggable, id, irrelevant, lang, ref, Registrationmark, TabIndex, template, For a complete description of the title, visit the standard properties in HTML 5.
Event Properties
Onabort, onbeforeunload, onblur, onchange, onclick, OnContextMenu, ondblclick, Ondrag, Ondragend, OnDragEnter, OnDragLeave, OnDragOver, ondragstart, OnDrop, OnError, onfocus, onkeydown, onkeypress, onkeyup, onload, OnMessage, OnMouseDown, OnMouseMove, onmouseover, onmouseout, onmouseup, OnMouseWheel, OnResize, Onscroll, Onselect, onsubmit, OnUnload for a complete description, visit the event properties in HTML 5.
Tiy instance
Simple Drop-down List
<html>
<body>
<form>
<select name= "Cars" >
<option value= "Volvo" >Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Fiat" >Fiat</option>
<option value= "Audi" >Audi</option>
</select>
</form>
</body>
</html>
This example shows how to create a simple drop-down list box in an HTML page. The Drop-down list box is an optional list.
Another drop-down list
<html>
<body>
<form>
<select name= "Cars" >
<option value= "Volvo" >Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Fiat" Selected= "selected" >Fiat</option>
<option value= "Audi" >Audi</option>
</select>
</form>
</body>
</html>
This example shows how to create a simple drop-down list with preselection values. (Note: Preselection values refer to predetermined preferences.) )