|
|
Registered tutorials: 501 Registered Users: 33128
|
|
Rating: 1 out of 2 votes cast
Category: JavaScript Framework
|
Clearing Form Data
Abstract: This article shows the code example how to clean up the form field with jQuery
A question I often hear is, "How do I clear a form?" Initially the answer seems very straightforward - a one-liner in jQuery:
$('form :input').val("");
But upon closer examination we find that this is a bad way to solve the problem. When someone says they want to "clear a form" what they really mean is that they want to clear the visible state from all the form fields. With this in mind, the code above is clearly not the right way to get the job done.
|
Reviews:
Rate and Review This Site
No reviews yet
Statistic Information About this Resource:
| Total Hits: |
62 |
| Unique Hits: |
58 |
| |
Daily |
Weekly |
Monthly |
| |
Unique |
Total |
Unique |
Total |
Unique |
Total |
| Average |
0.2 |
0.2 |
0.5 |
0.5 |
1.7 |
1.9 |
| Current |
0 |
0 |
0 |
0 |
0 |
0 |
| Previous |
0 |
0 |
2 |
2 |
5 |
5 |
| Nov 29 |
0 |
0 |
1 |
1 |
0 |
0 |
| Nov 28 |
0 |
0 |
0 |
0 |
1 |
1 |
| Nov 27 |
0 |
0 |
2 |
2 |
1 |
1 |
| Nov 26 |
0 |
0 |
0 |
0 |
4 |
6 |
| Nov 25 |
1 |
1 |
0 |
0 |
4 |
4 |
| Nov 24 |
0 |
0 |
0 |
0 |
0 |
0 |
| Nov 23 |
1 |
1 |
0 |
0 |
0 |
0 |
| Nov 22 |
0 |
0 |
0 |
0 |
2 |
2 |
| Highest |
5 |
6 |
12 |
14 |
20 |
22 |
|
|
|
Script Execution Time: 0.31341 | SQL Queries: 10 | Members: 501
Ajax Tutorial Top List - Powered by Aardvark Topsites PHP 5.1.2
|