基本信息
源码名称:js 右下角弹窗 浮动层 广告效果
源码大小:2.57KB
文件格式:.zip
开发语言:js
更新时间:2013-01-19
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
window.onload = getMsg; window.onresize = resizeDiv; window.onerror = function(){} var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0; function getMsg() {// try { divTop = parseInt(document.getElementById("ww_zzjs_net").style.top,10); divLeft = parseInt(document.getElementById("ww_zzjs_net").style.left,10); divHeight = parseInt(document.getElementById("ww_zzjs_net").offsetHeight,10); divWidth = parseInt(document.getElementById("ww_zzjs_net").offsetWidth,10); docWidth = document.body.clientWidth; docHeight = document.body.clientHeight; document.getElementById("ww_zzjs_net").style.top = parseInt(document.body.scrollTop,10) docHeight 10; //divHeight document.getElementById("ww_zzjs_net").style.left = parseInt(document.body.scrollLeft,10) docWidth - divWidth; document.getElementById("ww_zzjs_net").style.visibility="visible"; objTimer = window.setInterval("moveDiv()",10); } catch(e){} }// //初始化位置 function resizeDiv() { i =1; //if(i>300) closeDiv() //想不用自动消失由用户来自己关闭所以屏蔽这句 try { divHeight = parseInt(document.getElementById("ww_zzjs_net").offsetHeight,10); divWidth = parseInt(document.getElementById("ww_zzjs_net").offsetWidth,10); docWidth = document.body.clientWidth; docHeight = document.body.clientHeight; document.getElementById("ww_zzjs_net").style.top = docHeight - divHeight parseInt(document.body.scrollTop,10); document.getElementById("ww_zzjs_net").style.left = docWidth - divWidth parseInt(document.body.scrollLeft,10); } catch(e){} }// //最小化 function minsizeDiv() { i =1 //if(i>300) closeDiv() //想不用自动消失由用户来自己关闭所以屏蔽这句 try { divHeight = parseInt(document.getElementById("zzjs_net").offsetHeight,10); divWidth = parseInt(document.getElementById("zzjs_net").offsetWidth,10); docWidth = document.body.clientWidth; docHeight = document.body.clientHeight; document.getElementById("zzjs_net").style.top = docHeight - divHeight parseInt(document.body.scrollTop,10); document.getElementById("zzjs_net").style.left = docWidth - divWidth parseInt(document.body.scrollLeft,10); } catch(e){} }// //移动 function moveDiv() { try { if(parseInt(document.getElementById("ww_zzjs_net").style.top,10) <= (docHeight - divHeight parseInt(document.body.scrollTop,10))) { window.clearInterval(objTimer); objTimer = window.setInterval("resizeDiv()",1); } divTop = parseInt(document.getElementById("ww_zzjs_net").style.top,10); document.getElementById("ww_zzjs_net").style.top = divTop -1; } catch(e){} } function minDiv() { closeDiv(); document.getElementById('zzjs_net').style.visibility='visible'; objTimer = window.setInterval("minsizeDiv()",1); }// function maxDiv() { document.getElementById('zzjs_net').style.visibility='hidden'; document.getElementById('ww_zzjs_net').style.visibility='visible'; objTimer = window.setInterval("resizeDiv()",1); //resizeDiv() getMsg(); } function closeDiv() { document.getElementById('ww_zzjs_net').style.visibility='hidden'; document.getElementById('zzjs_net').style.visibility='hidden'; if(objTimer) window.clearInterval(objTimer); }