<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; <BR>return false; <BR>} <BR>} <BR>//禁止右键弹出菜单 <BR>function document.oncontextmenu() <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 键不放, <BR>用鼠标点掉警告框,这种屏蔽方法就失效了。以后若 <BR>有哪位高手有真正屏蔽 Alt 键的方法,请告知。*/ <BR>if ((event.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>