一个弹出页面的徐徐升起的js效果

<HTML>
<HEAD>
<title>提醒信息</title>
<base target="_blank">
<SCRIPT language="JavaScript">
    window.resizeTo(220,210);
    var windowW=220  // wide
    var windowH=210  // high

    var Yoffset=0   // in pixels, negative values allowed
    var windowStep=2 // move increment (pixels)
    var moveSpeed=12 // move speed (larger is slower)

    var Xoffset=25;

    var windowX = (screen.width/2)-(windowW/2);
    windowX=screen.availWidth-Xoffset-windowW;
    var windowY = (screen.availHeight);
    var windowYstop = windowY-windowH-Yoffset;
    var windowYnow = windowY;

    window.focus ();
    resizeTo(windowW,windowH);
    moveTo(windowX,windowY);

    function movePFW() {
         if (document.all) {
             if (windowYnow>=windowYstop) {
                 moveTo(windowX,windowYnow);
                 //self.focus();
                 windowYnow=windowYnow-windowStep;
                 timer=setTimeout("movePFW()",moveSpeed);
             } else {
                 clearTimeout(timer);
                 setTimeout("moveBack()",120000 )
                 moveTo(windowX,windowYstop);
             }
         } else {
             moveTo(windowX,windowYstop);
         }
    }
    function moveBack() {
         if (document.all){
             if (windowYnow<=windowY){
                 moveTo(windowX,windowYnow);
                 windowYnow=windowYnow+windowStep;
                 timer1=setTimeout("moveBack()",moveSpeed);
             } else {
                 clearTimeout(timer1);
                 moveTo(windowX,windowY);
                 self.close()
             }
         } else {
             moveTo(windowX,windowYstop);
             self.close()
         }
    }
</SCRIPT>
</HEAD>
<body bottomMargin="0" bgColor="#ffffcc" leftMargin="5" topMargin="0" onload="movePFW()" rightMargin="0">
<form name="Form1" method="post" action="this.htm" id="Form1">
  <FONT face="宋体">
        <TABLE id="Table1" style="WIDTH: 180px; HEIGHT: 176px" cellSpacing="0" cellPadding="0" border="0">
          <TBODY>
            <TR>
              <TD class="td"></TD>
              <TD class="td"><HR width="100%" color="#006699" SIZE="1"></TD>
            </TR>
            <TR>
              <TD class="td" vAlign="top" height="100%"></TD>
              <TD class="td" vAlign="top" height="100%"><span><br>⊙欢迎你第一次使用!</span></TD>
            </TR>
            <TR>
              <TD width="8"></TD>
              <TD></TD>
            </TR>
          </TBODY>
        </TABLE>
      </FONT>
    </form>
  </body>
</HTML>

本文使用Blog_Backup未注册版本导出,请到soft.pt42.com注册。

posted @ 2007-05-26 19:53  音乐啤酒  阅读(235)  评论(0编辑  收藏  举报