window.onmousedown Redirect 1

« DOM Reference

Summary

An event handler for the mousedown event on the window.

Syntax

window.onmousedown = funcRef;

Parameters

  • funcRef is a reference to a function.

Example

window.onmousedown = doFunc;
<html>
<head>

<title>onmousedown test</title>

<script type="text/javascript">

window.onmousedown = mousedown;

function mousedown()
{
 alert("mousedown event detected!");
}
</script>
</head>

<body>
<p>click and hold down the LH mouse button<br />
 on the page to fire the mousedown event.</p>
</body>
</html>

Notes

The mousedown event is raised when the user clicks the mouse button anywhere in the document.

Specification

Not part of specification.

Document Tags and Contributors

 Last updated by: Sheppy,