HTML output name attribute
Examples
Perform calculations and display the results in the <output> element:
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
<input type="range" id="a" value="50">100
+<input type="number" id="b" value="50">
=<output name="x" for="a b"></output>
</form>
try it"
Browser Support
Firefox, Opera, Chrome and Safari browsers support name attribute.
Note: Internet Explorer browser does not support <output> tag.
Definition and Usage
name attribute specifies the name of the <output> element.
name attribute is used in the form submission form reference data, or used to refer to elements in JavaScript.
Differences between HTML 4.01 and HTML5
<Output> tag is new in HTML5 tags.
grammar
<output name="name">
Property Value
值 | 描述 |
---|---|
name | 规定 <output> 元素的名称。 |
HTML <output> tag