Javascript examples for DOM Event:onclick
Change element value as click anchor link
<html> <head> <title>Sandbox</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <script>var clickCount= 0; </script> </head> <body> <a href="http://www.google.com" target="_blank" onclick="document.getElementById('dbg').innerHTML = ++clickCount"> open new </a> <div id="dbg"></div> </body>/*from ww w . jav a 2 s . co m*/ </html>