Mega Code Archive

 
Categories / JavaScript Tutorial / Document
 

Document onmousedown

The onMouseDown event handler specifies what should happen when the mouse button is pressed within the Document object. <html>     <head>     <script language="JavaScript1.2">     <!--     document.onmousedown = myMouseDownHandler;     function myMouseDownHandler() {       alert("A mouse down event took place within the document!");     }     -->     </script>     </head>     <body>     Press the mouse button down within this document.     </body>     </html>