HTML DOM Output value Property
THE WORLD'S LARGEST WEB DEVELOPER SITE

Output value Property

❮ Output Object

Example

Set the result of a calculation:

document.getElementById("myOutput").value = "150";
Try it Yourself »

More "Try it Yourself" examples below.


Definition and Usage

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