Thursday, 17 August 2017

Clear form input fields except radio/select menu values?

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>