Latest web development tutorials

HTML select name attribute

HTML select tag Reference Manual HTML <select> tag

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>

try it"

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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 Reference Manual HTML <select> tag