简单的js右下角弹框

<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"></head>
<body>
<!--<script type="text/javascript" src="2010123166691_files/tc.js"></script>-->
 
<script type="text/javascript">
 window.onresize = baiduResizeDiv;
 window.onerror = function(){}
 var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
 var px = document.doctype?"px":0;
 var scrollwidth = navigator.userAgent.indexOf("Firefox")>0?16:0;
 var iframeheight = navigator.userAgent.indexOf("MSIE")>0?230-2:209-2;
 String.prototype.Trim  = function(){return this.replace(/^\s+|\s+$/g,"");}
 function baidu_collapse(obj){
//  ct = document.getElementById('tab_c_iframe');
//  if(ct.style.display=="none"){
//   ct.style.display="";
//   obj.src=obj.src.replace("b.gif","a.gif");
//  } else {
//   ct.style.display="none";
//   obj.src=obj.src.replace("a.gif","b.gif");
//  }
document.getElementById("eMeng").style.display="none";
  baiduResizeDiv();
 }
 function baiduMsg()
 {
  try{
   divTop = parseInt(document.getElementById("eMeng").style.top,10);
   divLeft = parseInt(document.getElementById("eMeng").style.left,10);
   divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10);
   divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10);

   var scrollPosTop,scrollPosLeft,docWidth,docHeight;
   if (typeof window.pageYOffset != 'undefined') {
    scrollPosTop = window.pageYOffset;
    scrollPosLeft = window.pageXOffset;
    docWidth = window.innerWidth;
    docHeight = window.innerHeight;
   } else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
    scrollPosTop = document.documentElement.scrollTop;
    scrollPosLeft = document.documentElement.scrollLeft;
    docWidth = document.documentElement.clientWidth;
    docHeight = document.documentElement.clientHeight;
   } else if (typeof document.body != 'undefined') {
    scrollPosTop = document.body.scrollTop;
    scrollPosLeft = document.body.scrollLeft;
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
   }
 
   document.getElementById("eMeng").style.top = parseInt(scrollPosTop,10) + docHeight -divHeight-50+ px;// divHeight
   document.getElementById("eMeng").style.left = parseInt(scrollPosLeft,10) + docWidth - divWidth -scrollwidth -50+ px;
   document.getElementById("eMeng").style.visibility="visible";
   objTimer = window.setInterval("baidu_move_div()",10);
  }catch(e){}
 }
 function baiduResizeDiv()
 {
  i+=1;
  try{
   divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10);
   divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10);

   var scrollPosTop,scrollPosLeft,docWidth,docHeight;
   if (typeof window.pageYOffset != 'undefined') {
    scrollPosTop = window.pageYOffset;
    scrollPosLeft = window.pageXOffset;
    docWidth = window.innerWidth;
    docHeight = window.innerHeight;
   } else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
    scrollPosTop = document.documentElement.scrollTop;
    scrollPosLeft = document.documentElement.scrollLeft;
    docWidth = document.documentElement.clientWidth;
    docHeight = document.documentElement.clientHeight;
   } else if (typeof document.body != 'undefined') {
    scrollPosTop = document.body.scrollTop;
    scrollPosLeft = document.body.scrollLeft;
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
   }
 
   document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(scrollPosTop,10)-50 + px;
   document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(scrollPosLeft,10) - scrollwidth -50+ px;
  }catch(e){}
 }
 function baidu_move_div()
 {

  var scrollPosTop,scrollPosLeft,docWidth,docHeight;
  if (typeof window.pageYOffset != 'undefined') {
   scrollPosTop = window.pageYOffset;
   scrollPosLeft = window.pageXOffset;
   docWidth = window.innerWidth;
   docHeight = window.innerHeight;
  } else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
   scrollPosTop = document.documentElement.scrollTop;
   scrollPosLeft = document.documentElement.scrollLeft;
   docWidth = document.documentElement.clientWidth;
   docHeight = document.documentElement.clientHeight;
  } else if (typeof document.body != 'undefined') {
   scrollPosTop = document.body.scrollTop;
   scrollPosLeft = document.body.scrollLeft;
   docWidth = document.body.clientWidth;
   docHeight = document.body.clientHeight;
  }
  try{
   if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(scrollPosTop,10)))
   {
    window.clearInterval(objTimer);objTimer = window.setInterval("baiduResizeDiv()",1);
   }
   divTop = parseInt(document.getElementById("eMeng").style.top,10);
   document.getElementById("eMeng").style.top = divTop - 1 + px;
  }catch(e){}
 }
 function zzjs_net(h,w,caption,title,message){
 
   window.onload = baiduMsg;
 
  var str;
   
  var str = "<DIV id='eMeng' style='Z-INDEX:99999;LEFT:0px;POSITION:absolute;TOP:0px;VISIBILITY:hidden; WIDTH: "+w+"px; BORDER-BOTTOM: #455690 1px solid; font-size:12px; back-color:#ccc; HEIGHT: " + h + "px; >";
    str += "<table style='BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid' cellSpacing=0 cellPadding=0 width='100%' bgColor=#ffffff border=0>";
    str += "<tr  >";
    str += "<td  width='30' height='24'></td>";
    str += "<td   vAlign='center' width='100%'>"+caption+"</td>";
    str += "<td  valign='right' style='PADDING-RIGHT: 2px; PADDING-TOP: 2px'   width=19>";
    str += "<span title='关闭' οnclick='javascript:baidu_collapse(this)'  style='FONT-WEIGHT: bold; FONT-SIZE: 12px; cursor: hand; color: red;  '    > × </span></td>";
    str += "</tr>";
    str += "<tr>";
    str += "<td style='padding-right: 1px;padding-botton: 1px' colSpan=3 height=" + (h - 28) + ">";
    str += "<div >" + title + "<br/><br/>";
    str += "<div  ><A href='javascript:void(0)' hidefocus=false id='btCommand'><FONT color=#ff0000>" + message + "</FONT></A><A href='#' hidefocus=false id='ommand'><FONT color=#ff0000></FONT></A></DIV>";
    str += "</div>";
    str += "</td>";
    str += "</tr>";
    str += "</table>";
    str += "</div>";
   
  document.writeln(str);
 }
  zzjs_net(120,120, "欢迎进入天贸企业管理平台", "今天是<%= FormatDateTime(date, 1) %>", "您有 <%= count_num %> 条新的信函.");
</script>
    <p>
        f</p>
    <p  >
        fsfsfss</p>
    <p>
        sssss</p>
    <p>
        s</p >
    <p>
        s</p>
    <p>
        ss</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        ss</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        &nbsp;</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s实施&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        莪靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠靠&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <p>
        sss</p>
    <p>
        &nbsp;</p>
    <p>
        s</p>
    <p>
        &nbsp;</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        s</p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
</body></html>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值