How to clear all input text in jQuery?
When we design a form, there will be a button “Clear” that will clear all input text boxes and teatarea field, in this example we provide the solution through jQuery. jQuery will be run on button (Clear) click and clear all input text boxes along with textarea field.
If you don’t write something and leave the field that will remain empty. Furthermore if you write something and leave and again click on that field it will remove your entered data also. Yeah this can be a problem if user click on a text field or text area, and enter nothing then change focus field.
How is each ( ) function used in jQuery?
Sometimes you need to disable/enable the form element like input or textarea. Jquery helps you to easily make this with setting disabled attribute to “disabled”. For e.g.: To enable disabled element you need to remove “disabled” attribute from this element or empty it’s string.
Is there way to disable form element in jQuery?
You can use the jQuery prop () method to disable or enable form element or control dynamically using jQuery. The prop () method require jQuery 1.6 and above.