Do you have a reset when accessing the page?

0

I would like to know if you can run <input type="reset"> when you access a page, without clicking any button!

    
asked by anonymous 27.06.2014 / 16:44

2 answers

1

You will have to use js or jquery, there are several ways to do this.

$(function() {
   $('#id_do_form')[0].reset();
   //ou
   $('#id_do_form').trigger("reset");
});

It has several other means.

    
27.06.2014 / 16:54
0

You can try using the window.onload function to do this.

JS

window.onload = function (){
  document.getElementById("FormId").reset();
}

JQuery

$( document ).ready(function() {
    $('#FormId').reset();
});
    
27.06.2014 / 21:34