Regardless of whether I try to switch to index.html # ExistingAnchor or index.html # NotExistingAnchor or any other anchor that may or may not exist on page I would like the javascript function to be run.
<html>
<body>
<a name="ExistingAnchor"></a>
</body>
</html>
What javascript code can I use to achieve it?
Perhaps the page is already loaded, so I’ll just visit the HTML bindings on one page from the address bar of the browser without reloading the page.
Also, having visited a number of bindings on the same page, when I use the browser's back and forward buttons, I would like some kind of JavaScript function to also be launched so that I can determine which anchor I am currently - could you also report this?
source
share