open.js
上传用户:apresys
上传日期:2021-03-30
资源大小:813k
文件大小:3k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

DOS

  1. minimizebar="image/skin/min.gif";   //窗口右上角最小化“按钮”的图片
  2. minimizebar2="image/skin/min.gif"; //鼠标悬停时最小化“按钮”的图片
  3. closebar="image/skin/close.gif";         //窗口右上角关闭“按钮”的图片
  4. closebar2="image/skin/close.gif";       //鼠标悬停时关闭“按钮”的图片
  5. icon="image/skin/close.gif";              //窗口左上角的小图标
  6. function noBorderWin(fileName,w,h,titleBg,moveBg,titleColor,titleWord,scr)  //定义一个弹出无边窗口的函数,能数意义见下面“参数说明”,实际使用见最后的实例。
  7. /*
  8. ------------------参数说明-------------------
  9. fileName   :无边窗口中显示的文件。
  10. w      :窗口的宽度。
  11. h      :窗口的高度。
  12. titleBg    :窗口“标题栏”的背景色以及窗口边框颜色。
  13. moveBg     :窗口拖动时“标题栏”的背景色以及窗口边框颜色。
  14. titleColor :窗口“标题栏”文字的颜色。
  15. titleWord  :窗口“标题栏”的文字。
  16. scr        :是否出现滚动条。取值yes/no或者1/0。
  17. --------------------------------------------
  18. */
  19. {
  20.   var contents="<html>"+
  21.                "<head>"+
  22.         "<title>"+titleWord+"</title>"+
  23.    "<link href='nobody.css' rel='stylesheet' type='text/css'>"+
  24.    "<meta http-equiv="Content-Type" content="text/html; charset=gb2312">"+
  25.    "<link href='nobody.css' rel='stylesheet' type='text/css'>"+
  26.    "<object id=hhctrl type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'><param name='Command' value='minimize'></object>"+
  27.    "</head>"+
  28.                "<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'  oncontextmenu='return false' onkeydown='if(event.ctrlKey)return false'>"+
  29.    "  <table height=100% width=100% cellpadding=0 cellspacing=0 bgcolor="+titleBg+" id=mainTab class='body1'>"+
  30.    "    <tr bordercolor="+titleBg+" height=18 style=cursor:default; onmousedown='x=event.x;y=event.y;setCapture();mainTab.bgColor=""+moveBg+"";' onmouseup='releaseCapture();mainTab.bgColor=""+titleBg+"";' onmousemove='if(event.button==1)self.moveTo(screenLeft+event.x-x,screenTop+event.y-y);'>"+
  31.    "      <td width=18 align=center background='image/skin/title.gif'><img height=12 width=12 border=0 src="+icon+"></td>"+
  32.    "      <td width="+w+" background='image/skin/title.gif'>"+titleWord+"</td>"+
  33.    "      <td width=14 background='image/skin/title.gif'><img border=0 alt=最小化 src="+minimizebar+" onmousedown=hhctrl.Click(); onmouseover=this.src='"+minimizebar2+"' onmouseout=this.src='"+minimizebar+"'></td>"+
  34.    "      <td width=13 background='image/skin/title.gif'><img border=0 alt=关闭 src="+closebar+" onmousedown=nbw_v6_iframe.exitask(); onmouseover=this.src='"+closebar2+"' onmouseout=this.src='"+closebar+"'></td>"+
  35.    "    </tr>"+
  36.    "    <tr height=*>"+
  37.    "      <td colspan=4 align=center>"+
  38.    "        <iframe name=nbw_v6_iframe src="+fileName+" scrolling="+scr+" width=100% height=100% frameborder=0></iframe>"+
  39.    "      </td>"+
  40.    "    </tr>"+
  41.    "  </table>"+
  42.    "</body>"+
  43.    "</html>";
  44.   pop=window.open("","_blank","fullscreen=yes");
  45.   pop.resizeTo(w,h);
  46.   pop.moveTo((screen.width-w)*8/9,(screen.height-h)/2);
  47.   pop.document.writeln(contents);
  48. }