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.
示例
语法
value()
value(value)
参数
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!