Clear form input fields except radio/select menu values?
First way ---
$(':input','#myform').not(':button, :submit, :reset, :hidden').val('').removeAttr('checked').removeAttr('selected');
(OR)
$('#FormIDReset').trigger('click');
<button class=" " type="reset" id="FormIDReset">Clear</button>
(OR)
$('#FormIDReset').trigger('click');
<button class=" " type="reset" id="FormIDReset">Clear</button>
No comments:
Post a Comment