Reset default values ​​form

I currently have:

$("#your_email").val(this.defaultValue;) 

I want to cycle through all the elements of the form and reset them to the default

+7
javascript jquery default-value
source share
1 answer

you don't need jQuery for this, just get the dom form element and call reset () on it.

Or, select using jQuery, for example:

 $("#myFormId")[0].reset(); 
+23
source share

All Articles