javascript change hidden input value

JavaScript
document.getElementById("myHiddenInputID").value = "MyNewValue";
Source

Also in JavaScript: