shah rushabh shah rushabh - 1 year ago 110
HTML Question

How to clear form data jquery?

I want to clear all form input data after a submitting all input data to php file how can I clear this data by using jquery function?

Answer Source

You can listen to the submit event and then clear the values of each input like below:

$('#form').submit(function() {
<script src=""></script>
<form id="form">
  <input type="text" />
  <input type="submit" />

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download