Answers for "call function on page refresh in javascript"

31

javascript reload page

location.reload();
Posted by: Guest on June-14-2019
0

refresh page and run function after javascript

window.onload = function() {
    var reloading = sessionStorage.getItem("reloading");
    if (reloading) {
        sessionStorage.removeItem("reloading");
        myFunction();
    }
}

function reloadP() {
    sessionStorage.setItem("reloading", "true");
    document.location.reload();
}
Posted by: Guest on November-03-2020

Code answers related to "call function on page refresh in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language