I want to change the default value for the input field so that when I reset the form the value remains.
I have the following code that sets a value using jQuery, but when I press reset, the value becomes the original.
<form> Email: <input type="text" id="email" value="old value" /> <input type="reset" value="reset" /> </form> $(function(){ $("#email").val("New value"); });
source share