Key event type : Event Type « Event « JavaScript Tutorial






<html>
    <head>
        <title>Key Events Example</title>
        <script type="text/javascript">
            function handleEvent(oEvent) {
                var oTextbox = document.getElementById("txt1");
                oTextbox.value += "\n>" + oEvent.type;
            }
        </script>
    </head>
    <body>
        <P>Type some characters into the first textbox.</p>
        <P><textarea id="txtInput" rows="15" cols="50"
            onkeydown="handleEvent(event)"
            onkeyup="handleEvent(event)"
            onkeypress="handleEvent(event)"></textarea></p>
        <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