English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The form attribute specifies one or more forms that the dropdown list belongs to.
An example dropdown list outside (but still part of) the form:
<form action="action_page.php" id="carform"> Firstname:<input type="text" name="fname"> <input type="submit"> </form> <br> <select name="carlist" form="carform"> <option value="PHP">PHP</option>/option> <option value="Python">Python</option> <option value="C#">C#</option> <option value="Golang">Golang</option> </select>Test See ‹/›
IEFirefoxOperaChromeSafari
Firefox, Opera, Chrome, and Safari support the form attribute.
Note:Internet Explorer does not support the form attribute of the <select> tag.
The form attribute specifies one or more forms that the dropdown list belongs to.
The form attribute in HTML5 New attribute added in.
<select form="form_id"
Value | Description |
---|---|
form_id | Specifies the form element that the <select> element belongs to. The value of this attribute must be the id attribute of a <form> element in the same document. |