jQuery provides the powerful val() method to handle value-related operations.
Get the value of a single select and the value of a multi-select.
HTML code:
< /p>
Get the value in the text box
HTML code:
jQuery code:
$("input").val() ;
Result:
some text
The following is how var() can get/assign the form element value