how to keep hidden value in html code example Example: javascript change hidden input value document.getElementById("myHiddenInputID").value = "MyNewValue";