📄 js_function.js
字号:
minimizebar="images/minimize.gif"; //fullScreen窗口右上角最小化“按钮”的图片
closebar="images/close.gif"; //fullScreen窗口右上角关闭“按钮”的图片
icon="images/icon.gif"; //fullScreen窗口左上角的小图标
function noBorderWin(fileName,w,h,titleBg,titleColor,titleWord,borderColor,scr)
/*
------------------参数说明-------------------
fileName :无边窗口中显示的文件。
w :窗口的宽度。
h :窗口的高度。
titleBg :窗口“标题栏”的背景色。
titleColor :窗口“标题栏”文字的颜色。
titleWord :窗口“标题栏”的文字。
borderColor:窗口“边框”的颜色。
scr :是否出现滚动条。取值yes/no或者1/0。
--------------------------------------------
*/
{
fullScreen=window.open('','','fullscreen=yes');
fullScreen.resizeTo(w,h);
fullScreen.moveTo(0,0);
fullScreen.document.writeln("<html>");
fullScreen.document.writeln("<head>");
fullScreen.document.writeln("<title>"+titleWord+"</title>");
fullScreen.document.writeln("<"+"script language=javascript"+">"+"cv=0"+"<"+"/script"+">");
fullScreen.document.writeln("<script language=\"JavaScript\">");
fullScreen.document.writeln("<!--");
fullScreen.document.writeln("function MM_swapImgRestore() { //v3.0");
fullScreen.document.writeln(" var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;");
fullScreen.document.writeln("}");
fullScreen.document.writeln("function MM_preloadImages() { //v3.0");
fullScreen.document.writeln(" var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();");
fullScreen.document.writeln(" var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)");
fullScreen.document.writeln(" if (a[i].indexOf(\"#\")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}");
fullScreen.document.writeln("}");
fullScreen.document.writeln("function MM_findObj(n, d) { //v4.01");
fullScreen.document.writeln(" var p,i,x; if(!d) d=document; if((p=n.indexOf(\"?\"))>0&&parent.frames.length) {");
fullScreen.document.writeln(" d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}");
fullScreen.document.writeln(" if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];");
fullScreen.document.writeln(" for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);");
fullScreen.document.writeln(" if(!x && d.getElementById) x=d.getElementById(n); return x;");
fullScreen.document.writeln("}");
fullScreen.document.writeln("function MM_swapImage() { //v3.0");
fullScreen.document.writeln(" var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)");
fullScreen.document.writeln(" if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}");
fullScreen.document.writeln("}");
fullScreen.document.writeln("function Click(){ ");
fullScreen.document.writeln("window.event.returnValue=false;");
fullScreen.document.writeln("} ");
fullScreen.document.writeln("document.oncontextmenu=Click; ");
fullScreen.document.writeln("//-->");
fullScreen.document.writeln("</script>");
fullScreen.document.writeln("</head>");
fullScreen.document.writeln("<body topmargin=0 leftmargin=0 scroll=no onLoad=\"MM_preloadImages('Images/minimize_on.gif','Images/close_on.gif')\" onkeydown='if(event.keyCode==78&&event.ctrlKey)return false;' onkeydown='if(event.keyCode==116) {event.keyCode=0;event.returnValue=false;}'>");
fullScreen.document.writeln("<table border=0 cellspacing=0 cellpadding=0 width=100% height=100% style=\"border: 0px solid "+borderColor+"\">");
fullScreen.document.writeln("<tr><td height=20 style='background-image: url(Images/topBG.gif)'>");
fullScreen.document.writeln("<table width=100% border=0 cellspacing=0 cellpadding=0 style='cursor:default;'>");
fullScreen.document.writeln("<tr onselectstart='return false' onmousedown='cv=1;x=event.x;y=event.y;setCapture();' onmouseup='cv=0;releaseCapture();' onmousemove='if(cv)window.moveTo(screenLeft+event.x-x,screenTop+event.y-y);'>");
fullScreen.document.writeln("<td width=30 align=center nowrap><img border=0 width=16 height=16 src="+icon+" align=absmiddle></td>");
fullScreen.document.writeln("<td nowrap style=\"padding-top: 2px; font-family:宋体; font-size:12px; color:"+titleColor+";\">"+titleWord+"</td>");
fullScreen.document.writeln("<td align=center width=20 nowrap>");
fullScreen.document.writeln("<a onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('minimize','','Images/minimize_on.gif',1)\"><img name=minimize border=0 width=16 height=16 align=absmiddle alt=最小化 src="+minimizebar+" onclick=window.blur();></a>");
fullScreen.document.writeln("</td>");
fullScreen.document.writeln("<td align=center width=18 nowrap>");
fullScreen.document.writeln("<a onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('close','','Images/close_on.gif',1)\"><img name=close border=0 width=16 height=16 align=absmiddle alt=关闭 src="+closebar+" onclick=window.close();></a>");
fullScreen.document.writeln("</td>");
fullScreen.document.writeln("<td align=right width=20 height=25 nowrap><img src='images/topRight.gif' border=0 width=10 height=25></td>");
fullScreen.document.writeln("</tr>");
fullScreen.document.writeln("</table>");
fullScreen.document.writeln("</td>");
fullScreen.document.writeln("</tr>");
fullScreen.document.writeln("<tr>");
fullScreen.document.writeln("<td><iframe frameborder=0 width=100% height=100% scrolling=\"no\" src="+fileName+"></iframe></td>");
fullScreen.document.writeln("</tr>");
fullScreen.document.writeln("</table>");
fullScreen.document.writeln("</body>");
fullScreen.document.writeln("</html>");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -