1 <html> 2 <style>a { text-decoration: underline; display: block; }</style> 3 <body> 4 <a onclick="javascript:alert('1');">link with no href but onclick</a> 5 <a id="add-click-handler-to-me">link with no href and click handler added via script</a> 6 <script> 7 document.getElementById('add-click-handler-to-me'). 8 addEventListener('click', function() { alert('2'); }, false); 9 </script> 10 </body> 11 </html> 12