English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die form-Attribut spezifiziert ein oder mehrere Formulare, zu denen die Dropdown-Liste gehört.
Eine Dropdown-Liste außerhalb des Formulars (aber dennoch Teil des Formulars):
<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 value="Python">Python</option> <option value="C#">C#</option> <option value="Golang">Golang</option> </select>Test it out ‹/›
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 | Specify 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. |