<div class="codetitle"> <span><a style="CURSOR: pointer" data="63833" class="copybut" id="copybut63833" onclick="doCopy('code63833')"><u>Copy code</u></a></span> The code is as follows:</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){ // Press Esc <br>//Things to do<br>} <br>if(e && e.keyCode==113){ / / Press F2 <br>//Things to do<br>} <br>if(e && e.keyCode==13){//enter key<br>//Things to do<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> </div>