<div class="codetitle"> <span><a style="CURSOR: pointer" data="34212" class="copybut" id="copybut34212" onclick="doCopy('code34212')"><u>複製程式碼</u></a></span> 程式碼如下:</div> <div class="codebody" id="code34212"> <br><script language="javascript"> <BR>//禁止使用F5鍵<BR>function document.onkeydown() <BR>{ <BR>if ( event.keyCode==116) <BR>{ <BR>event.keyCode = 0; <BR>event.cancelBubble = true; 🎜>return false; <BR>} <BR>} <BR>//禁止右鍵彈出選單<BR>function document.oncontextmenu() <BR>{ <BR>return false; <BR>} <BR>{ <BR>return false; <BR>} <BR>下列程式碼實作全螢幕顯示<BR>function window.onload(){ <BR>var Request = new Array();//儲存參數<BR>var s = location.search.substring(1); <BR>if ( s && s!=""){ <BR>var list = s.split("&"); <BR>for (var i=0; i < list.length; i ){ <BR>var pair = list [i].split("="); <BR>if (pair[0] && pair[0] !=""){ <BR>Request[unescape(pair[0])] = unescape(pair[1 ]); <BR>} <BR>} <BR>} <BR>var fullscreen=Request["fullscreen"]; <BR>if(fullscreen!="yes"){ <BR>var file =self.location ; <BR>var a = window.open("about:blank","","fullscreen=yes") <BR>self.opener=null <BR>self.close() <BR>a.location=file "?fullscreen=yes"; <BR>} <BR>} <BR></script> <br><script language="Javascript"><!-- <BR>//屏蔽滑鼠右鍵、Ctrl N、Shift F10、F11、F5刷新、退格鍵<BR>//Author: meizz(梅花雨) 2002-6-18 <BR>function document.oncontextmenu(){event.returnValue=false;}//屏蔽滑鼠右鍵<BR>function window.onhelp(){return false} //屏蔽F1幫助<BR>function document.onkeydown() <BR>{ <BR>if ((window.event.altKey)&& <BR>((window. event.keyCode==37)|| //屏蔽Alt 方向鍵← <BR>(window.event.keyCode==39))) //屏蔽Alt 方向鍵→ <BR>{ <BR>alert("不準你使用ALT 方向鍵前進或後退網頁! "); <BR>event.returnValue=false; <BR>} <BR>/* 注意:這還不是真正屏蔽Alt 方向鍵, <BR>因為Alt 方向鍵彈出警告框時,按住Alt 鍵不按住Alt 鍵不按住放, <BR>用滑鼠點掉警告框,這種屏蔽方法就失效了。 keyCode==8) || //屏蔽退格刪除鍵<BR>(event.keyCode==116)|| //屏蔽F5 刷新鍵<BR>(event.ctrlKey && event.keyCode==82)){ //Ctrl R <BR>event.keyCode=0; <BR>event.returnValue=false; <BR>} <BR>if (event.keyCode==122){event.keyCode=0;event.returnValue=false ;} //屏蔽F11 <BR>if (event.ctrlKey && event.keyCode==78) event.returnValue=false; //屏蔽Ctrl n <BR>if (event.shiftKey && event.keyCode==121)event .returnValue=false; //屏蔽shift F10 <BR>if (window.event.srcElement.tagName == "A" && window.event.shiftKey) <BR>window.event.returnValue = false; //shift 加上屏蔽滑鼠左鍵新開一網頁<BR>if ((window.event.altKey)&&(window.event.keyCode==115)) //封鎖Alt F4 <BR>{ <BR>window.showModelessDialog("about: blank","","dialogWidth:1px;dialogheight:1px"); <BR>return false; <BR>} <BR>} <BR></script> <br> </div>