English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
form 属性规定 <output> 元素所属的一个或多个表单。
位于表单外部(但仍是表单的一部分)的<output>元素:
<!DOCTYPE html> <html> <head> <title>HTML:<output> form 属性 - 基础教程网(oldtoolbag.com)</title> </head> <body> <form action="action_page.php" id="numform" oninput="x.value=parseInt(a.value)+parseInt(b.value)>0 <input type="range" id="a" name="a" value="30">100 +<input type="number" id="b" name="b" value="30"> <br><br> <input type="submit"> </form> <p>The output element below is outside the form, but is still part of the form.</p> <output form="numform" name="x" for="a b"></output> </body> </html>Test see ‹/›
IEFirefoxOperaChromeSafari
Almost all mainstream browsers do not support the form attribute.
The form attribute specifies one or more forms to which the <output> element belongs.
The <output> tag is an HTML5 new tag in.
<output form="form_id">
Value | Description |
---|---|
form_id | Specify the form element to which the <output> element belongs. The value of this attribute must be the id attribute of a <form> element in the same document. |