javascript change value of input element before submit code example Example: javascript onsubmit change input value document.getElementById("form_id").submit();