I have tried $("#client.frm").reset(); but it is not working.So how to reset form via jQuery?
I have tried $("#client.frm").reset(); but it is not working.So how to reset form via jQuery?
Try this :
$('#resetBtn').on('click', function(e){
e.preventDefault();
$("#myform")[0].reset.click();
}
You can clear the whole form using onclick function.Here is the code for it.
<button type="reset" value="reset" type="reset" class="btnreset" onclick="window.location.reload()">Reset</button>
window.location.reload() function will refresh your page and all data will clear.