Javascript Event How to - Handle key up event


We would like to know how to handle key up event.


<!--  w w w  . j  ava 2  s  .co m-->
    <script language="JavaScript1.2">
    function showDialog(){
      console.log("A key was released");
    <form name="myForm">
       <textarea name="myTextArea" rows=2 cols=50 onKeyUp='showDialog()'>
       Here is some text in my text area.

The code above is rendered as follows: