c#中的回車jsp

<HEAD>
<script type="text/Jscript">
   function KeyDownHandler(btnEnter)
   {
    // process only the Enter key
    if (event.keyCode == 13)
    {
     // cancel the default submit
     event.returnValue=false;
     event.cancel = true;
     // submit the form by programmatically clicking the specified button
     btnEnter.click();
    }
   }
  </script>
</HEAD>


引用:
<asp:textbox id="txtMachine" onkeydown="KeyDownHandler(btnFaultType)" .......
btnFaultType為運行按鈕.

posted @ 2006-03-10 14:48  华博  阅读(398)  评论(1编辑  收藏  举报