这篇文章主要介绍了基于javascript实现右下角浮动广告效果,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
本文实例为大家分享了基于javascript实现右下角浮动广告效果,供大家参考,具体内容如下
效果图:
具体代码:
右下角广告代码window.onload = getMsg;
window.onresize = resizeDiv;
window.onerror = function(){}
function $(id) {return document.getElementById(id);}
//短信提示使用(asilas添加)
var divT,divL,divW,divH,docH,docW,docST,docSL,objTimer,i = 0;
function getMsg()
{
try{
divT = parseInt($("eMeng").style.top,10); //层top位置
divL = parseInt($("eMeng").style.left,10); //层left位置
divH = parseInt($("eMeng").offsetHeight,10);//层宽
divW = parseInt($("eMeng").offsetWidth,10);//层高
docW = document.documentElement.clientWidth;//窗口宽
docH = docu