output element

<output>

Explanation

Output element is used to find the sum of two numbers.
<form oninput="x.value=parseInt(a.value)+parseInt(b.value)">0 <input type="Value" name="Name" value="Value"/>500 +<input type="Value" name="Name" value="Value" /> =<output name="Value" for="Name"></output> </form>
Element Specific attributes supported by this element are:
AttributeValueDescription
forelement_idDefines the connection between the inputs used in calculation and calculation result.
formform_idDefines additional forms, in which the <output> is a part of it.
namenameMentions a name for input.

Example Code:

Result :

0 500 + =


  • User cannot edit the result.
  • Results are delivered simultaneously when user enters the values in text boxes.
  • The minimum value is set as "Zero".
It supports both Global Attributes and Event Attributes in HTML5.
It is newly introduced in HTML5 and it is not available in earlier versions of HTML.

Limitations:

Except Internet Explorer, it will function in all the browsers.

Ask Questions

Ask Question