Javascript examples for DOM HTML Element:Anchor
Calling href from anchor element
<html> <head></head> <body> <script language="Javascript" type="text/javascript"> function somescript() {/*from www. ja va 2 s . c o m*/ window.location.href = document.getElementById('ololo').href; } </script> <a href="javascript:console.log('test');" id="ololo">test</a> <br> <a href="javascript:somescript()">click me</a> </body> </html>