Output value Property
Example
Set the result of a calculation:
document.getElementById("myOutput").value = "150";
Try it Yourself »
More "Try it Yourself" examples below.
Description
The value property sets or returns the value of the <output> element.
The value represents the result of a calculation.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
value | 10.0 | Not supported | 4.0 | 5.1 | 11.0 |
Syntax
Return the value property:
outputObject.value
Set the value property:
outputObject.value = result
Property Values
Value | Description |
---|---|
result | Specifies the result of the calculation |
Technical Details
Return Value: | A String, representing the result of the calculation |
---|
More Examples
Example
Get the result of a calculation:
var x = document.getElementById("myOutput").value;
Try it Yourself »
❮ Output Object
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.