How to get or set the value of a textbox using jQuery

To get or set the value of a textbox using jQuery you can use the following snippet.

Sample jQuery

$("#myTextField").val() //get
$("#myTextField").val("newValue") //set

Please Share us:
Please rate this snippet

5 thoughts on “How to get or set the value of a textbox using jQuery

Leave a Reply