<div class="codetitle"> <span><a style="CURSOR: pointer" data="31103" class="copybut" id="copybut31103" onclick="doCopy('code31103')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code31103"> <br>document.onkeypress = function( e ){ <br> <br>document.onkeypress = function( e ){ <br> ( e ) ); <br>}; <br>function getCharCode( e ){ <br>var e = e || window.event; <br>if( typeof e.charCode == "number" ){ <br>return e.charCode; <br>}else{ <br>return e.keyCode; <br>}; </div>};