output
Summary
The HTML <output> element represents the result of a calculation.
Overview Table
The HTML <output> element represents the result of a calculation.
Attributes
for
= unordered set of unique space-separated tokens
Allows an explicit relationship to be made between the result of a calculation and the elements that represent the values that went into the calculation or that otherwise influenced the calculation.
This attribute must have the value of an ID of an element in the same Document.form
= the ID of a form element in the element’s owner
Associate the output element with its form owner.
By default, the output element is associated with its nearest ancestor form element.name
= unique name
Represents the element’s name.
Examples
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" name="b" value="50" /> +
<input type="number" name="a" value="10" /> =
<output name="result"></output>
</form>