页面内右下角弹出提示

<HTML>
<HEAD>
<TITLE> Pop Window </TITLE>
<META NAME="Author" CONTENT="HuangQing">
</HEAD>

<style>
 .title{font-weight:bold;font-size:14px;}
 .Content{font-size:12px;}

</style>

<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!--

var strTitle,strDescription,y,ey,iTime,ShowTime;
y=0;
ey=160,//弹出层最后位置
iTime=0,
ShowTime=2;//层弹出后显示时间(秒)

strTitle = "标题";
strDescription="<br>&nbsp;说明:<br>&nbsp;&nbsp;&nbsp;&nbsp;弹出窗体要显示的内容<br><br>";

document.write("<div id=popmsg style=position:absolute;right:0px;bottom:0px;width:260px;z-index:1;padding:0px 0px 0px 0px;word-break:break-all;text-align:left;background-image:url(images/popmsgbg.gif);>");

document.write("<table width=100% border=1 cellpadding=0 cellspacing=0 bgcolor=#0099CC>");
document.write("    <tr>");
document.write("      <td align=center class=title>"+strTitle+"</td>");
document.write("    </tr>");
document.write("    <tr>");
document.write("      <td class=Content>"+strDescription+"</td>");
document.write("    </tr>");
document.write("  </table>");
document.write("</div>");

setTimeout("ActionPopMsg()",10);

function ActionPopMsg()
{
  
  if (y<=ey)
  {
 document.all.popmsg.style.bottom = y; 
 setTimeout("ActionPopMsg()",10); 
    y = y+2;
  }
  else
  {
 HiddenPopMsg();
  }
 
}

function HiddenPopMsg()

 iTime++;
 if (iTime>ShowTime)
 {
  document.all.popmsg.style.visibility = "hidden";  
 } 
 setTimeout("HiddenPopMsg()",1000);
}

//-->
</SCRIPT>

</BODY>
</HTML>

posted @ 2005-10-21 13:32  小小点  阅读(279)  评论(0)    收藏  举报