Answers for "how to refresh the browser with a click in javascript"

19

jquery reload page

$('#myElement').click(function() {
    location.reload();
});
Posted by: Guest on July-22-2019
0

javascript button onclick reload page

const reloadtButton = document.querySelector("#reload");
// Reload everything:
function reload() {
    reload = location.reload();
}
// Event listeners for reload
reloadButton.addEventListener("click", reload, false);
Posted by: Guest on June-05-2020

Code answers related to "how to refresh the browser with a click in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language