Javascript examples for jQuery:Form Input
Set value of hidden input with jquery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.js"></script> <script type="text/javascript"> $(window).load(function(){/* ww w. j a v a 2 s.c o m*/ var test = $("input[name=testing]:hidden"); test.val('work!'); console.log('The value of hidden input is: ' + test.val()) }); </script> </head> <body> <input name="testing" type="hidden"> </body> </html>