弹出无边窗口
来源:易贤网 阅读:746 次 日期:2014-09-15 15:03:13
温馨提示:易贤网小编为您整理了“弹出无边窗口”,方便广大网友查阅!

弹出无边窗口,弹出无边窗口

<html>

<head>

<script language=javascript>

minimizebar=minimize.gif; //窗口右上角最小化“按钮”地图片

minimizebar2=minimize2.gif; //鼠标悬停时最小化“按钮”地图片

closebar=close.gif; //窗口右上角关闭“按钮”地图片

closebar2=close2.gif; //鼠标悬停时关闭“按钮”地图片

icon=icon.gif; //窗口左上角地小图标

function noborderwin(filename,w,h,titlebg,movebg,titlecolor,titleword,scr) //定义一个弹出无边窗口地函数,能数意义见下面“参数说明”,实际使用见最后地实例.

/*

------------------参数说明-------------------

filename :无边窗口中显示地文件.

w     :窗口地宽度.

h     :窗口地高度.

titlebg :窗口“标题栏”地背景色以及窗口边框颜色.

movebg :窗口拖动时“标题栏”地背景色以及窗口边框颜色.

titlecolor :窗口“标题栏”文字地颜色.

titleword :窗口“标题栏”地文字.

scr :是否出现滚动条.取值yes/no或者1/0.

--------------------------------------------

*/

{

var contents=<html>+

<head>+

&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <title>+titleword+</title>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <meta http-equiv=\content-type\ content=\text/html; charset=gb2312\>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <object id=hhctrl type='application/x-oleobject' classid='clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11'><param name='command' value='minimize'></object>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </head>+

<body topmargin=0 leftmargin=0 scroll=no onselectstart='return false' ondragstart='return false'>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <table height=100% width=100% cellpadding=0 cellspacing=1 bgcolor=+titlebg+ id=maintab>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tr 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);'>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <td width=18 align=center><img height=12 width=12 border=0 src=+icon+></td>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <td width=+w+><span style=font-size:12px;color:+titlecolor+;font-family:宋体;position:relative;top:1px;>+titleword+</span></td>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <td width=14><img border=0 width=12 height=12 alt=最小化 src=+minimizebar+ onmousedown=hhctrl.click(); onmouseover=this.src='+minimizebar2+' onmouseout=this.src='+minimizebar+'></td>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <td width=13><img border=0 width=12 height=12 alt=关闭 src=+closebar+ onmousedown=self.close(); onmouseover=this.src='+closebar2+' onmouseout=this.src='+closebar+'></td>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tr>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tr height=*>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <td colspan=4>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <iframe name=nbw_v6_iframe src=+filename+ scrolling=+scr+ width=100% height=100% frameborder=0></iframe>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </tr>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </table>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </body>+

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </html>;

pop=window.open(,_blank,fullscreen=yes);

pop.resizeto(w,h);

pop.moveto((screen.width-w)/2,(screen.height-h)/2);

pop.document.writeln(contents);

if(pop.document.body.clientwidth!=w||pop.document.body.clientheight!=h) //如果无边窗口不是出现在纯粹地ie窗口中

{

temp=window.open(,nbw_v6);

&nbsp;&nbsp;&nbsp;&nbsp;temp.close();

&nbsp;&nbsp;&nbsp;&nbsp;window.showmodaldialog(about:<+script language=javascript>window.open('','nbw_v6','fullscreen=yes');window.close();+</+script>,,dialogwidth:0px;dialogheight:0px);

&nbsp;&nbsp;&nbsp;&nbsp;pop2=window.open(,nbw_v6);

pop2.resizeto(w,h);

pop2.moveto((screen.width-w)/2,(screen.height-h)/2);

pop2.document.writeln(contents);

&nbsp;&nbsp;&nbsp;&nbsp;pop.close();

}

}

</script>

</head>

<body>

<!----------------- 实例一(按钮),修改参数可改变窗口样式 ----------------->

<button onclick=noborderwin('test.html','400','240','#000000','#333333','#cccccc','一个无边窗口地测试例子','yes');>open</button>

<br><br>

<!----------------- 实例二(链接),修改参数可改变窗口样式 ----------------->

<a href=#none onclick=noborderwin('test.html','400','240','#000000','#333333','#cccccc','一个无边窗口地测试例子','yes');>open</a>

<br><br>

<!----------------- 实例三(图片),修改参数可改变窗口样式 ----------------->

<img src=none height=30 width=60 alt=open style=cursor:hand onclick=noborderwin('test.html','400','240','#000000','#333333','#cccccc','一个无边窗口地测试例子','no');>无滚动条地

</body>

</html>

更多信息请查看IT技术专栏

更多信息请查看脚本栏目
易贤网手机网站地址:弹出无边窗口
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!

2025国考·省考课程试听报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 云南省教育厅备案号:云教ICP备0901021 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65099533/13759567129 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标