HTML <output> for Attribute
Example
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="b" name="b" value="50" /> +
<input type="number" id="a" name="a" value="10" /> =
<output name="result" for="a b">50</output>
</form>
Meaning
The for attribute should be set to the id value(s) of the elements that target this element.
This element specifies the relationship between the result of the calculation and the elements contributed input values to this calculation.
The value of this attribute can be a list of IDs of other elements.
Standard Syntax
<output for="elementId">...</output>
Advertisement
Attribute Values
| Value | Description |
|---|---|
| elementId | unordered set of unique space-separated tokens |