THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Output value Property

Output Object Reference 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

Examples

More Examples

Example

Get the result of a calculation:

var x = document.getElementById("myOutput").value;

The result of x could be:

112
Try it yourself »

Output Object Reference Output Object