Get mouse event type: ondblclick : Event Type « Event « JavaScript Tutorial






<html>
<head>
<title>Mouse Events Example</title>
<script type="text/javascript">
    function handleEvent(oEvent) {
        var oTextbox = document.getElementById("txt1");
        oTextbox.value += "\n" + oEvent.type;


    }
</script>
</head>
<body>
<P>Use your mouse to click and double click the red square.</p>
<div style="width: 100px; height: 100px; background-color: red"
     ondblclick="handleEvent(event)"
     id="div1"></div>
<P><textarea id="txt1" rows="15" cols="50"></textarea></p>
</body>
</html>








15.3.Event Type
15.3.1.Key event type
15.3.2.Get mouse event type: click
15.3.3.Get mouse event type: onmouseover
15.3.4.Get mouse event type: onmouseout
15.3.5.Get mouse event type: onmousedown
15.3.6.Get mouse event type: onmouseup
15.3.7.Get mouse event type: ondblclick