ancy ancy - 1 year ago 87
HTML Question

Clear all fields in a form whenever hit back button

I used below code to reset all fields data whenever user hit back button.It is working perfectly on firefox but not in chrome.

Here is my code:

$(window).load(function() {
$('form').get(0).reset(); //clear form data on page load

Answer Source

Try this, it should work on chrome


instead of

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