Html – refresh page with reset button

htmljquery

I want to reset my page with a button.

This is my code:

$(".reset").click(function () {
    document.location.reload(true);
});

<button id="reset">RESET</button>

Anyone an idea what I have to change?

Best Solution

Hi You have defined id as reset for the button and in jquery code called as class so it should be:

$("#reset").click(function(){
  document.location.reload(true);
});

Thanks