Wednesday, February 26, 2014

jQuery / get or set - text input value

How to check value of text input?
var myInputValue = $('#myInput').val();



jQuery
 

 

 

 
 
     
    Get input value
 
    


How to set input text value?
$('#myInput').val('My new value');



jQuery
 

 

 

 
 
     
    Set msg to second input

    Type here new msg
    

No comments: