Last active
December 17, 2015 04:38
-
-
Save Xeroday/5551688 to your computer and use it in GitHub Desktop.
Hovering over the link shows one URL, but clicking on it sends you to another.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function showLink() { | |
document.getElementById("theLink").setAttribute("href","http://www.google.com"); //URL to show | |
} | |
function clickJack() { | |
document.getElementById("theLink").setAttribute("href","http://www.bing.com"); //URL that it actually goes to | |
} | |
</script> | |
<a id="theLink" href="#" onmouseover="showLink()" onmousedown="clickJack()">Click me</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment