Javascript examples for jQuery:Form Input
Get the value of the input field.
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ console.log($("input").val()); });//from w ww . j a va 2 s . co m </script> </head> <body> Name: <input type="text" value="old value"> </body> </html>