Textarea.onKeyDown : TextArea : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » TextArea »

 

Textarea.onKeyDown







The onKeyDown event handler is fired when a key is pressed down within the text area.












<html>
    <head>
    <script language="JavaScript1.2">
    <!--
    function showDialog(){
      alert("A key was pressed down");
    }
    -->
    </script>
    </head>
    <body>
    <form name="myForm">
      <textarea name="myTextArea" rows=cols=50 onKeyDown='showDialog()'>
      Here is some text in my text area.
      </textarea>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» TextArea