linux社区爱心援助Linux认证系列教程业界动态站务新闻公司招聘网络学院网址大全LPI专题CISCO专题
设为首页
加入收藏
管理团队
JSP  
JAVA  
PERL  
 您的位置:首页 > 开发语言 > JavaScript >
栏目导栏
  php
  JSP
  ASP
  asp.net
  JAVA
  c/c++/c#
  perl
  JavaScript
  Basic
  Delphi
资料搜索
热门文章
·javascript 时间对象的格式化
·去掉字符串前后的空格
·javascript 事件监听机制
·javascript 事件调用顺序
·js刷新框架子页面的七种方法
·JavaScript:替换字符串
·IE下的JScript编程需注意的内存
·用javascript操作word文档
·Javascript中CTRL+回车提交表单
·JS 获取鼠标位置
·javascript判断Email地址是否有
·Javascript中Select的OnChange
·JS实现的滑动展开与折叠效果
·有分页功能的WEB打印
·Javascript实现窗口最大化的严
最新文章
·使用CSS改变表格边框样式
·为网页添加浮动广告
·判断表单中添加是否数字的JS与
·让浏览器状态栏动起来
·使用Javascript制作行间颜色间
·禁止用右键查看源代码
·网页侦测四法
·制作弹出公告窗口
·为网页添加特效
·网页中取消鼠标右键方法大全
·JavaScript 根据屏幕解析度显示
·如何实现浏览器上的右键菜单
·如何制作浮动广告
·让弹出窗口变得“体贴”一些
·JavaScript技巧:让网页自动穿上
Google
 
IE浏览器右下脚弹出的广告特效代码
[ 作者:  加入时间:2007-10-29 13:52:47  来自:Linux联盟收集整理 ]

<html>hEvLinux联盟
<head>hEvLinux联盟
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />hEvLinux联盟
<title>WWW.Webjx.Com</title>hEvLinux联盟
</head>hEvLinux联盟
<body>hEvLinux联盟
<!-- Code Begin -->

看到右下角的提示了吗?如果没有看到,<button onclick=location.reload();>刷新</button>一下hEvLinux联盟
<script language="JavaScript">hEvLinux联盟
window.onload = getMsg;hEvLinux联盟
window.onresize = resizeDiv;hEvLinux联盟
window.onerror = function(){}hEvLinux联盟
//短信提示使用(asilas添加)hEvLinux联盟
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;hEvLinux联盟
function getMsg()hEvLinux联盟
{hEvLinux联盟
 try{hEvLinux联盟
 divTop = parseInt(document.getElementById("eMeng").style.top,10)hEvLinux联盟
 divLeft = parseInt(document.getElementById("eMeng").style.left,10)hEvLinux联盟
 divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)hEvLinux联盟
 divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)hEvLinux联盟
 docWidth = document.body.clientWidth;hEvLinux联盟
 docHeight = document.body.clientHeight;hEvLinux联盟
 document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;//  divHeighthEvLinux联盟
 document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidthhEvLinux联盟
 document.getElementById("eMeng").style.visibility="visible"hEvLinux联盟
 objTimer = window.setInterval("moveDiv()",10)hEvLinux联盟
 }hEvLinux联盟
 catch(e){}hEvLinux联盟
}

function resizeDiv()hEvLinux联盟
{hEvLinux联盟
 i+=1hEvLinux联盟
 if(i>500) closeDiv()hEvLinux联盟
 try{hEvLinux联盟
 divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)hEvLinux联盟
 divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)hEvLinux联盟
 docWidth = document.body.clientWidth;hEvLinux联盟
 docHeight = document.body.clientHeight;hEvLinux联盟
 document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)hEvLinux联盟
 document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)hEvLinux联盟
 }hEvLinux联盟
 catch(e){}hEvLinux联盟
}

function moveDiv()hEvLinux联盟
{hEvLinux联盟
 tryhEvLinux联盟
 {hEvLinux联盟
 if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))hEvLinux联盟
 {hEvLinux联盟
 window.clearInterval(objTimer)hEvLinux联盟
 objTimer = window.setInterval("resizeDiv()",1)hEvLinux联盟
 }hEvLinux联盟
 divTop = parseInt(document.getElementById("eMeng").style.top,10)hEvLinux联盟
 document.getElementById("eMeng").style.top = divTop - 1hEvLinux联盟
 }hEvLinux联盟
 catch(e){}hEvLinux联盟
}hEvLinux联盟
function closeDiv()hEvLinux联盟
{hEvLinux联盟
 document.getElementById('eMeng').style.visibility='hidden';hEvLinux联盟
 if(objTimer) window.clearInterval(objTimer)hEvLinux联盟
}hEvLinux联盟
</script>hEvLinux联盟
<DIV id=eMeng style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX:99999; LEFT: 0px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 180px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 0px; HEIGHT: 116px; BACKGROUND-COLOR: #c9d3f3">hEvLinux联盟
 <TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0>hEvLinux联盟
 <TBODY>hEvLinux联盟
  <TR>hEvLinux联盟
   <TD style="FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #0f2c8c" width=30 height=24></TD>hEvLinux联盟
   <TD style="FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #1f336b; PADDING-TOP: 4px;PADDING-left: 4px" vAlign=center width="100%"> 短消息提示:</TD>hEvLinux联盟
   <TD style="BACKGROUND-IMAGE: url(msgTopBg.gif); PADDING-TOP: 2px;PADDING-right:2px" vAlign=center align=right width=19><span title=关闭 style="CURSOR: hand;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick=closeDiv() >&#215;</span><!-- <IMG title=关闭 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg"> --></TD>hEvLinux联盟
  </TR>hEvLinux联盟
  <TR>hEvLinux联盟
   <TD style="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: url(1msgBottomBg.jpg); PADDING-BOTTOM: 1px" colSpan=3 height=90>hEvLinux联盟
    <DIV style="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%">您有<font color=#FF0000>1</font>封新短消息<BR><BR>hEvLinux联盟
    <DIV align=center style="word-break:break-all"><a href="javascript:alert('你好')"><font color=#FF0000>点击查看短信</font></a></DIV

    </DIV>hEvLinux联盟
   </TD>hEvLinux联盟
  </TR>hEvLinux联盟
 </TBODY>hEvLinux联盟
 </TABLE>hEvLinux联盟
</DIV>hEvLinux联盟
<!-- Code Over -->hEvLinux联盟
</body>hEvLinux联盟
</html>

Linux联盟收集整理 ,转贴请标明原始链接,如有任何疑问欢迎来本站Linux论坛讨论
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关链接
 ·IE浏览器中一个值得关注的JS问题  (2007-10-29 13:49:46)
 ·详细解析网页漂浮广告代码的含义  (2007-10-29 13:49:01)
 ·网页中任意漂浮的广告代码  (2007-10-29 13:27:23)
 ·ubuntu安装IE浏览器  (2007-05-28 11:35:42)