| Viewed 38 times

jquery how to change the input value


jquery how to change the input value

1 Answer
Mohammad Qandeel
Answered
0

just you need to use val() method  to get or edit input value

<form>
 <input type="text" id="myInput">
</form>
$('#myInput').val('new value');//change input value
var inputVal = $('#myInput').val(); //get the input value and save it in variable