HTML <output> with for Attribute
HTML <output> with for Attribute
The for
attribute specifies the id of the <input> elements that are contributed to the output.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
<input type="range" id="b" value="50"> +
<input type="number" id="a" value="10"> =
<output name="result" for="a b">60</output>
</form>
</body>
</html>
Attribute Value
Value | Explanation |
---|---|
element_id | Specifies the id of the <input> elements that are contributed to the output. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.