/ Published in: JavaScript
Expand |
Embed | Plain Text
<html> <head> <script> function clickBg(e) { evt = e || window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) targ = targ.parentNode; if (targ.id == 'body') window.open('http://www.google.com/'); } </script> </head> <body onclick="clickBg(event);" id="body"> <div> Some content with a <a href="http://www.google.com" target="_blank">link</a> in it.</div> </body> </html>
You need to login to post a comment.
