I want to create a hyperlink that does not link to any page. When clicked, it executes the javascript function that I defined. So, I created the link as follows:
<a onclick="fun()"> SomeText </a>
But the mouse pointer does not change to a hand symbol when we hover over a link.
So, I changed the link to
<a href="#" onclick="fun()"> SomeText </a>
So now I get the hand symbol, but now the location in the address bar changes to <url> / # whenever I click on the link.
Is there a way to create a hyperlink that is not associated with any location, but the mouse pointer should change to a hand symbol when you hover over it?
Thanks.
source
share