I want to clear all input and textarea fields in a form. It works like the following when using an input button with the reset class:
reset
$(\".reset
The following code clear all the form and it's fields will be empty. If you want to clear only a particular form if the page is having more than one form, please mention the id or class of the form
$("body").find('form').find('input, textarea').val('');