for attribute | for property
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Specifies the IDs of the elements from which the output was calculated.
Syntax
| HTML | <element for="p" ... > |
|---|---|
| JavaScript | |
Property values
Type: String
Remarks
The for values must have the value of an ID of an element. The values must are case sensitive and must be unique and space-separated.
Examples
<form oninput="result.value=parseInt(valOne.value)+parseInt(valeTwo.value)"> <input type="number" id="valOne" value="5" /> + <input type="number" id="valTwo" value="20" /> = <output name="result" for="valOne valTwo"></output> </form>
See also
Show: