document.onclick : onclick : Document JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Document » onclick »

 

document.onclick







The onClick event handler specifies what should happen when the mouse is clicked within the Document object.








<head>
    <script language="JavaScript">
    <!--

    document.onclick = myClickHandler;


    function myClickHandler() {
      alert("The document was clicked!");
    }
    -->
    </script>
    </head>
    <body>
     click anywhere within this document.
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Document
» onclick