change input type hidden javascript code example Example: javascript change hidden input value document.getElementById("myHiddenInputID").value = "MyNewValue";