Answers for "how to set javascript when page reload then that script runs"

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 "how to set javascript when page reload then that script runs"

Code answers related to "Javascript"

Browse Popular Code Answers by Language