Using jQuery you can clear form fields. Here I am going to describe, how we can clear all of the fields except a few using jQuery.
<div id="mainDiv"> <input type="text" id="txt1" /><br/> <input type="text" id="txt2" /><br/> <input type="text" id="txt3" /><br/> <input type="text" id="txt4" /><br/> <button id="clearall">Clear All</button> </div>
Now, we can get this using a jQuery like below:
$('#clearall').click(function(){
$('#mainDiv > input:text').val('');
}); In today’s fast-paced and highly competitive marketing environment, even the most creative campaign is only…
We are NYC moving firm. Are you planning a flat move? Maybe a distance or…
Mobile devices, unlike desktops and laptops, can not be handled by dozens or hundreds of…
Augmented Reality- An immersive experience for the learners! Learning and education aren’t the same as…
On special days like birthdays and weddings, we all like to celebrate our loved ones…
A web application is different from a regular mobile or desktop application as it runs…