Js_Function.js
上传用户:autodoor
上传日期:2022-08-04
资源大小:9973k
文件大小:6k
源码类别:

.net编程

开发平台:

Others

  1. minimizebar="images/minimize.gif"; //fullScreen窗口右上角最小化“按钮”的图片
  2. closebar="images/close.gif";       //fullScreen窗口右上角关闭“按钮”的图片
  3. icon="images/icon.gif";            //fullScreen窗口左上角的小图标
  4. function noBorderWin(fileName,w,h,titleBg,titleColor,titleWord,borderColor,scr)
  5. /*
  6. ------------------参数说明-------------------
  7. fileName   :无边窗口中显示的文件。
  8. w       :窗口的宽度。
  9. h       :窗口的高度。
  10. titleBg    :窗口“标题栏”的背景色。
  11. titleColor :窗口“标题栏”文字的颜色。
  12. titleWord  :窗口“标题栏”的文字。
  13. borderColor:窗口“边框”的颜色。
  14. scr        :是否出现滚动条。取值yes/no或者1/0。
  15. --------------------------------------------
  16. */
  17. {
  18.   fullScreen=window.open('','','fullscreen=yes');
  19.   fullScreen.resizeTo(w,h);
  20.   fullScreen.moveTo(0,0);
  21.   fullScreen.document.writeln("<html>");
  22.   fullScreen.document.writeln("<head>");
  23.   fullScreen.document.writeln("<title>"+titleWord+"</title>");
  24.   fullScreen.document.writeln("<"+"script language=javascript"+">"+"cv=0"+"<"+"/script"+">");
  25.   fullScreen.document.writeln("<script language="JavaScript">");
  26.   fullScreen.document.writeln("<!--");
  27.   fullScreen.document.writeln("function MM_swapImgRestore() { //v3.0");
  28.   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;");
  29.   fullScreen.document.writeln("}");
  30.   fullScreen.document.writeln("function MM_preloadImages() { //v3.0");
  31.   fullScreen.document.writeln("  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();");
  32.   fullScreen.document.writeln("    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)");
  33.   fullScreen.document.writeln("    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}");
  34.   fullScreen.document.writeln("}");
  35.   fullScreen.document.writeln("function MM_findObj(n, d) { //v4.01");
  36.   fullScreen.document.writeln("  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {");
  37.   fullScreen.document.writeln("    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}");
  38.   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];");
  39.   fullScreen.document.writeln("  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);");
  40.   fullScreen.document.writeln("  if(!x && d.getElementById) x=d.getElementById(n); return x;");
  41.   fullScreen.document.writeln("}");
  42.   fullScreen.document.writeln("function MM_swapImage() { //v3.0");
  43.   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)");
  44.   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];}");
  45.   fullScreen.document.writeln("}");
  46.   fullScreen.document.writeln("function Click(){ ");
  47.   fullScreen.document.writeln("window.event.returnValue=false;");
  48.   fullScreen.document.writeln("} ");
  49.   fullScreen.document.writeln("document.oncontextmenu=Click; ");
  50.   fullScreen.document.writeln("//-->");
  51.   fullScreen.document.writeln("</script>");
  52.   fullScreen.document.writeln("</head>");
  53.   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;}'>");
  54.   fullScreen.document.writeln("<table border=0 cellspacing=0 cellpadding=0 width=100% height=100% style="border: 0px solid "+borderColor+"">");
  55.   fullScreen.document.writeln("<tr><td  height=20 style='background-image: url(Images/topBG.gif)'>");
  56.   fullScreen.document.writeln("<table width=100% border=0 cellspacing=0 cellpadding=0 style='cursor:default;'>");
  57.   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);'>");
  58.   fullScreen.document.writeln("<td width=30 align=center nowrap><img  border=0 width=16 height=16 src="+icon+" align=absmiddle></td>");
  59.   fullScreen.document.writeln("<td nowrap style="padding-top: 2px; font-family:宋体; font-size:12px; color:"+titleColor+";">"+titleWord+"</td>");
  60.   fullScreen.document.writeln("<td align=center width=20 nowrap>");
  61.   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>");
  62.   fullScreen.document.writeln("</td>");
  63.   fullScreen.document.writeln("<td align=center width=18 nowrap>");
  64.   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>");
  65.   fullScreen.document.writeln("</td>");
  66.   fullScreen.document.writeln("<td align=right width=20 height=25 nowrap><img src='images/topRight.gif' border=0 width=10 height=25></td>");
  67.   fullScreen.document.writeln("</tr>");
  68.   fullScreen.document.writeln("</table>");
  69.   fullScreen.document.writeln("</td>");
  70.   fullScreen.document.writeln("</tr>");
  71.   fullScreen.document.writeln("<tr>");
  72.   fullScreen.document.writeln("<td><iframe frameborder=0 width=100% height=100% scrolling="no" src="+fileName+"></iframe></td>");
  73.   fullScreen.document.writeln("</tr>");
  74.   fullScreen.document.writeln("</table>");
  75.   fullScreen.document.writeln("</body>");
  76.   fullScreen.document.writeln("</html>");
  77. }