欢迎来到天天文库
浏览记录
ID:34723304
大小:46.75 KB
页数:3页
时间:2019-03-10
《html右下角弹出短信提示框弹窗》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、
2、aScript">window.onload=getMsg;window.onresize=resizeDiv;window.onerror=function(){}//短信提示使用(asilas添加)vardivTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i=0;functiongetMsg(){try{divTop=parseInt(document.getElementById("eMeng").style.top,10)divLeft=parseInt(document.getElement
3、ById("eMeng").style.left,10)divHeight=parseInt(document.getElementById("eMeng").offsetHeight,10)divWidth=parseInt(document.getElementById("eMeng").offsetWidth,10)docWidth=document.body.clientWidth;docHeight=document.body.clientHeight;document.getElementById("eMeng").style.top=parseInt(doc
4、ument.body.scrollTop,10)+docHeight+10;//divHeightdocument.getElementById("eMeng").style.left=parseInt(document.body.scrollLeft,10)+docWidth-divWidthdocument.getElementById("eMeng").style.visibility="visible"objTimer=window.setInterval("moveDiv()",10)}catch(e){}}functionresizeDiv(){i+=1if(
5、i>500)closeDiv()try{divHeight=parseInt(document.getElementById("eMeng").offsetHeight,10)divWidth=parseInt(document.getElementById("eMeng").offsetWidth,10)docWidth=document.body.clientWidth;docHeight=document.body.clientHeight;document.getElementById("eMeng").style.top=docHeight-divHeight+
6、parseInt(document.body.scrollTop,10)document.getElementById("eMeng").style.left=docWidth-divWidth+parseInt(document.body.scrollLeft,10)}catch(e){}}functionmoveDiv(){try{if(parseInt(document.getElementById("eMeng").style.top,10)<=(docHeight-divHeight+parseInt(document.body.scrollTop,10))){
7、window.clearInterval(objTimer)objTimer=window.setInterval("resizeDiv()",1)}divTop=parseInt(document.getElementById("eMeng").style.top,10)document.getElementById("eMeng").style.top=divTop-1}catch(e){}}functioncloseDiv(){document.getElementById('eMeng').style.visibili
此文档下载收益归作者所有