HTML output form attributes
Examples
Located in form form outside the <output> element (but still form part of the form):
<form action="demo_form.html" id="numform"
oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" name="a" value="50">100
+<input type="number" id="b" name="b" value="50">
<br><br>
<input type="submit">
</form>
<output form="numform" name="x" for="a b"></output>
oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" name="a" value="50">100
+<input type="number" id="b" name="b" value="50">
<br><br>
<input type="submit">
</form>
<output form="numform" name="x" for="a b"></output>
try it"
Browser Support
Almost all of the major browsers do not support the form attribute.
Definition and Usage
form attribute specifies <output> one or more form elements belongs.
Differences between HTML 4.01 and HTML5
<Output> tag is new in HTML5 tags.
grammar
<output form="form_id">
Property Value
值 | 描述 |
---|---|
form_id | 规定 <output> 元素所属的一个或多个表单的 id 列表,以空格分隔。 |
HTML <output> tag