Reference value()

value()

Returns or sets the element's value.

Calling myElement.value() returns the element's current value.

The parameter, value, is an optional number or string. If provided, as in myElement.value(123), it's used to set the element's value.

Examples

Syntax

value()
value(value)

Parameters

value
String|Number:

Returns

String|Number: value of the element.
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!

Related References