问题描述
<scriptlanguage="javascript">//屏蔽鼠标右键、Ctrl+N、Shift+F10、F11、F5刷新、退格键、Alt+F4functiondocument.oncontextmenu(){event.returnValue=false;}//屏蔽鼠标右键functionwindow.onhelp(){returnfalse}//屏蔽F1帮助键functiondocument.onkeydown(){if((window.event.altKey)&&((window.event.keyCode==37)||//屏蔽Alt+方向键←(window.event.keyCode==39)))//屏蔽Alt+方向键→{alert("不准你使用ALT+方向键前进或后退网页!");event.returnValue=false;}/*注:在这里不是真正地屏蔽了Alt+方向键,因为Alt+方向键弹出警告框后,按住Alt键不放,用鼠标点掉警告框,以上Alt+方向键的屏蔽设置就会失效。*/if((event.keyCode==8)||//屏蔽退格删除键(event.keyCode==116)||//屏蔽F5刷(event.ctrlKey&&event.keyCode==82))//Ctrl+R{event.keyCode=0;event.returnValue=false;}if(event.keyCode==122){event.keyCode=0;event.returnValue=false;}//屏蔽F11if(event.ctrlKey&&event.keyCode==78)event.returnValue=false;//屏蔽Ctrl+nif(event.shiftKey&&event.keyCode==121)event.returnValue=false;//屏蔽shift+F10if(window.event.srcElement.tagName=="A"&&window.event.shiftKey)window.event.returnValue=false;//屏蔽shift加鼠标左键新开一网页if((window.event.altKey)&&(window.event.keyCode==115))//屏蔽Alt+F4{window.showModelessDialog("about:blank","","dialogWidth:0px;dialogheight:0px");//将关闭时间给了这个dialogreturnfalse;}}//下面代码实现全屏显示functionwindow.onload(){varRequest=newArray();//保存参数vars=location.search.substring(1);if(s&&s!=""){varlist=s.split("&");for(vari=0;i<list.length;i++){varpair=list[i].split("=");if(pair[0]&&pair[0]!="")Request[unescape(pair[0])]=unescape(pair[1]);}}varfullscreen=Request["fullscreen"];if(fullscreen!="yes"){varfile=self.location;vara=window.open("about:blank","","fullscreen=yes");self.opener=null;self.close();a.location=file+"?fullscreen=yes";}}</script>
解决方案
解决方案二:
scrollbars=novara=window.open("about:blank","","fullscreen=yes,scrollbars=no");
解决方案三:
引用1楼jy02444572的回复:
scrollbars=novara=window.open("about:blank","","fullscreen=yes,scrollbars=no");
+1