Add document onclick event handler : onclick « Document « JavaScript Tutorial






<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>








14.20.onclick
14.20.1.document.onclick
14.20.2.Add document onclick event handler