"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"
<select> Label
Definitions and usage
<select> tag to create a drop-down list.
Differences between HTML 4.01 and HTML 5
HTML 5 has some new properties and no longer supports some HTML 4.01 properties.
Tips and Comments:
Wind Network (www.ithov.com) Tip: Use this tag in the form element to accept user input.
Example
<select>
<option http://www.aliyun.com/zixun/aggregation/9541.html ">value=" Volvo ">Volvo</option>
<option value= "Saab" >Saab</option>
<option value= "Opel" >Opel</option>
<option value= "Audi" >Audi</option>
</select>
Property
The
Property Value Description 4 5 Autofocus True false causes the Select field to focus when the page loads. The 5 data URL is used for automatic insertion. 5 Disabled true False when this property is true, the menu is disabled. 4 5 Form True false defines one or more forms to which the Select field belongs. 5 ListBox True False when this property is true, it is specified that multiple items can be selected at once. 4 5 name Unique_name defines a unique identifier for the Drop-down list. 4 5 Size number defines how many items are visible in the menu. Not supported. 4
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.) )