首页 | DV动态 | 数码产品 | 视频采编 | 网站建设 |
【收藏DV】
  最近3月排行
·一文看懂:无线蓝牙耳机、TWS耳机到底有何区别,以及蓝牙LE Audio技术等概念【关于标准的思考】
·DDL “deadline”
·详解联想小新Pro16和小新Pro16GT版区别
出现后自动消失的窗口
2004/11/20 20:31:07
 
超级小便携式笔记本充电器,两个type-c和一个USB接口,同时可以手机充电。 【3C认证】苹果超薄Magsafe磁吸充电宝快充外接迷你5000毫安移动电源适用于iPhone16可上飞机


出现后自动消失的窗口

出现后自动消失的窗口
<SCRIPT>
<!--

var flyingwin
var popupwidth=200
var popupheight=150
var marginright
var windowcenter
var i_top=200
var i_left=-popupwidth-50
var step=40
var timer
var waitingtime=5000
var pause=20

function showWindow() {
flyingwin = window.open("", "flyingwin", "toolbar=no,width="+popupwidth+",height="+popupheight+",top=100,left="+(-popupwidth)+"");
flyingwin.document.open();
flyingwin.document.write("<html><title>漂浮的窗口</title><body background=http://www.tastelife.net/images/bg.jpg text=#006600><p align=center><br><font size='+1' color=red><b>欢迎来到☆草原孤星☆</b></font><br><br>请不要关闭,我马上就自动滚蛋。</p><\/body><\/html>");
flyingwin.document.close();

if (document.all) {
marginright = screen.width+50
}
if (document.layers) {
marginright = screen.width+50
}
windowcenter=Math.floor(marginright/2)-Math.floor(popupwidth/2)
movewindow()

}

function movewindow() {
if (i_left<=windowcenter) {
flyingwin.moveTo(i_left,i_top)
i_left+=step
timer= setTimeout("movewindow()",pause)
}
else {
clearTimeout(timer)
timer= setTimeout("movewindow2()",waitingtime)
}
}

function movewindow2() {
if (i_left<=marginright) {
flyingwin.moveTo(i_left,i_top)
i_left+=step
timer= setTimeout("movewindow2()",pause)
}
else {
clearTimeout(timer)
flyingwin.close()
}
}

// -->
</SCRIPT>



说明:<body>中加入:onload=showWindow()

(DVOL本文转自:中国DV传媒 http://www.dvol.cn)

 

  上一篇:格式页定位特性
  下一篇:Select 选项的添加
      更多...
::打印本页 ::      ::关闭窗口::


版权所有© 数码在线网站 DV OnLine©  鲁ICP备12016322号-1