Event JavaScript Tutorial

< html>
    
        Key Events Example
        
            function handleEvent(oEvent) {
                var oTextbox = document.getElementById("txt1");
                oTextbox.value += "\n>" + oEvent.type;
            }
        
    
    
        

Type some characters into the first textbox.


        

            onkeydown="handleEvent(event)"
            onkeyup="handleEvent(event)"
            onkeypress="handleEvent(event)">