Answers for "js detect hash change"

0

js detect hash change

// Event listener
window.addEventListener("hashchange", e=>console.log('changed'), {});
// Event handler
window.onhashchange = e => console.log('changed');
// HTML event handler
<body onhashchange="funcRef();">
Posted by: Guest on November-03-2020
-1

javascript detect URL hash change

window.addEventListener("onhashchange", function(){
    //url hash # has changed
});
Posted by: Guest on July-31-2019

Code answers related to "Javascript"

Browse Popular Code Answers by Language