HTML select name attribute
Examples
With the name attribute drop-down list:
<select name="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
try it"
Browser Support
All major browsers support name attribute.
Definition and Usage
name attribute specifies the name of the drop-down list.
name attribute is used to reference elements in JavaScript, or a reference in the form submission form data.
Differences between HTML 4.01 and HTML5
no.
grammar
<select name="text">
Property Value
值 | 描述 |
---|---|
text | 下拉列表的名称。 |
HTML <select> tag