get/set element value and more
$ component install nickjackson/val
var val = require('val');
var el = document.querySelector('#textbox');
val(el).value('foo bar baz')
// set value to 'foo bar baz'
val(el).value()
//= 'foo bar baz'
.value()
- get value.value(str)
- set value
.value()
- get value- returns value or true if checked
- returns undefined if not checked.
.value(str)
- sets value.checked()
- gets checked state.checked(boolean)
- sets checked state.checkedValue()
- gets value irrelevant of checked
.value()
- get value.value(str)
- set value
.value()
- get value of selection option.value(str)
- set selected option by.value
.text()
- get innerText of selected option.text(str)
- set selected option by.innerText
- multiple support from select node
- Allow select-options to be added with object/array.
MIT