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('');
}); Let’s face it. Tech buzzwords get thrown around a lot—especially when it comes to how…
In today’s digital world, the boundaries between technology, finance, and innovation are rapidly disappearing. Businesses…
Backyard gatherings like BBQs, family reunions, and garden parties are an exciting way to enjoy…
Marketers are always on the lookout for more effective ways to reach their target audiences.…
Does your phone control your mind more than you control your phone? Modern life exploits…
Did you know that the prostate continues growing throughout a man's entire life, making BPH…