Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Parameter value Property

Parameter value Property

Parameter Object Reference Parameter Object

Example

Obtain the The value of the element:

var x = document.getElementById("myParam").value

x

The output is:

true

Try it »


Definition and Usage

The value property sets or returns the value of the value attribute of the parameter.

The value attribute describes The value of the element.

This attribute is usually used together with the name attribute to describe the plugin parameters of the tag.

The value of the value attribute can be any value supported by the specified object.

All major browsers support the tag. However, the file formats defined in it are not supported by all browsers.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the value attribute.


Syntax

Return the value attribute:

parameterObject

.value

Set the value attribute:

parameterObject

.value=

value

Attribute values

Value Description
value Specify the value of the parameter

Technical Details

Return Value: A string representing the value of the parameter

Related pages

HTML Reference Manual: HTML value attribute


Parameter Object Reference Parameter Object