Method for getting the value of input, select, and textarea. Note: Support for map, and function has not been added yet.
map
function
The value.
$('input[type="text"]').val();//=> input_text Copy
$('input[type="text"]').val();//=> input_text
https://api.jquery.com/val/
Method for setting the value of input, select, and textarea. Note: Support for map, and function has not been added yet.
The new value.
The instance itself.
$('input[type="text"]').val('test').prop('outerHTML');//=> <input type="text" value="test"/> Copy
$('input[type="text"]').val('test').prop('outerHTML');//=> <input type="text" value="test"/>
Method for getting the value of input, select, and textarea. Note: Support for
map, andfunctionhas not been added yet.