http://www.tuqiu.com/main.show.php?flag=%B4%B0%BF%DA%CC%D8%D0%A7&idnum=317&page=1

<SCRIPT>
<!--

var flyingwin
//窗口高度
var popupwidth=300
//窗口宽度
var popupheight=250
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.tuqiu.com/img/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()
}
}

// -->
showWindow();
</SCRIPT>

相关文章:

  • 2021-08-17
  • 2022-01-21
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2021-12-08
  • 2021-06-21
  • 2022-02-10
  • 2022-01-19
  • 2022-01-12
相关资源
相似解决方案