Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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();">
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #detect #hash #change
ADD COMMENT
Topic
Name
5+1 =