Execute javascript from link
- by GigaPr
Hi,
i am just trying to create a link which execute some JavaScript in stead to redirect the user to a particular page
I tried the following but it doesn t work
<a href="#" onclick="javascript:location.replace('http://http://stackoverflow.com/questions/ask');">www.google.com</a><br />
<a href="javascript:location.replace('http://stackoverflow.com/questions/ask');">www.google.com</a>
I am not trying to do anything illegal whit the redirect, just an exercise for a university module (Internet Security)
Thanks