Answers for "refresh page and run function after javascript"

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 "refresh page and run function after javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language