Add document onclick event handler
<html> <head> <title>W3C DOM Event Propagation</title> <script type="text/javascript"> function init() { document.onclick = docEvent; } function docEvent(evt) { alert("Document level ."); } </script> </head> <body onload="init()"> </body> </html>