Reset a form elements using jquery/javascript

By using jquery
$('#formID')[0].reset();

By using Javascript
document.getElementById("myForm").reset(); 

The reset() method resets the values of all elements in a form (same as clicking the Reset button)
.

No comments:

Post a Comment