English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Die Form-Attribute spezifizieren das Formular, dem der <input>-Element zugeordnet ist. Ein oder mehrere Formulare, den der <input>-Element zugeordnet ist
Ein Input-Feld, das sich außerhalb des HTML-Formulars befindet (aber dennoch ein Teil desselben ist):
<!DOCTYPE html> <html> <head> <title>HTML:<input> form Attribute - 基础教程网(oldtoolbag.com)</title> <body> <form action="action_page.php" id="form1"> First name: <input type="text" name="fname"><br> <input type="submit" value="Submit"> </form> <p>The "surname" field in <p> is outside the form element, but it is still part of the form.</> Last name: <input type="text" name="lname" form="form1"> </html>Test it out ‹/›
IEFirefoxOperaChromeSafari
Almost all mainstream browsers support the form attribute, except for Internet Explorer.
The form attribute specifies one or more forms to which the <input> element belongs.
The form attribute in HTML5 new attribute added in.
<input form="form_id">
Value | Description |
---|---|
form_id | Specify a list of one or more forms to which the <input> element belongs, separated by spaces. |