Javascript DOM Form Hidden Field set value
<html> <head> </head>/*from ww w. j av a 2s . co m*/ <body> <form> Hidden Field: <input type="hidden" id="userName"> </form> <script type="text/javascript"> let uNField = document.getElementById('userName'); uNField.value = "daveyjones"; </script> </body> </html>