<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="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>