How to clear all form’s control in RESET button click (Using JQuery)


Suppose we have many UI controls on HTML form like textbox, checkbox, select, labels, etc etc …. & we need to clear them all on RESET button function.

Now NO NEED TO LOOP thru all control and clear their contents …. 🙂 Thanks to JQuery Form Plugin ….

Example :

——————

HTML:

<input id=”Reset”  type=”reset” value=”Reset” />

JS:

$(‘#frmSearch’).clearForm();

——————-

That’s all …. 🙂 DONE ……

Further Reference for More function for this Jquery Form Plugin @ http://malsup.com/jquery/form/

DOWNLOAD  “Jquery.Form.js”
JQuery.form.js

 

Happy Coding … 🙂

Advertisements

2 thoughts on “How to clear all form’s control in RESET button click (Using JQuery)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s