ancy ancy - 5 months ago 31
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


Try this, it should work on chrome


instead of