<div class="codetitle"> <span><a style="CURSOR: pointer" data="63833" class="copybut" id="copybut63833" onclick="doCopy('code63833')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code63833"> <br><script type="text/javascript" language="JavaScript" charset="=JavaScript charset=" utf-8> <BR>var isPiss=0; <BR>document.onkeydown=function(event){ <BR>var e = event || window.event || arguments.callee.caller.arguments[0]; <BR>if(e && e.keyCode==27){ // 按Esc <BR>//要做的事情<BR>} <BR>if(e && e.keyCode==113){ // 按F2 <BR>//要做的事情<BR>} <BR>if(e && e.keyCode==13){//enter 鍵<BR>//要做的事情<BR>if(isPiss== 0){ <BR>$('#postAdd').focus(); <BR>var rows = grid.getSelecteds(); <BR>if(rows.length>0){ <BR>//onRowDblClick() ; <BR>onOk("add"); <BR>} <BR>} <BR>} <BR>}; <BR></script> </div>