2011-03-08 50 views

回答

0

爲什麼您正在使用richTextBox使用TextArea

<script language="JavaScript"> 
    <!-- 
    function onKeyDownMyTextArea() { 
      //Do stuff 
      alert("you have pressed key."); 
    } 
    --> 
</script> 

<body> 
    <textarea name="MyTextArea" cols="28" rows="4" onkeydown="onKeyDownMyTextArea();">/textarea> 
</body>