打开网页后右下角跳出QQ的提示信息类似框,很多人都会去点击。
if (cbr("Opera")){var de = document.body;
} else if (cbr("Gecko")){
if (document.doctype && document.doctype.indexOf("XHTML")>-1) {
var de = document.documentElement;
} else {
var de = document.body;
}
} else {
var de = document.body;
}
function cbr (brs) {
if (window.navigator.userAgent.indexOf(brs)>-1) {
return true;
}else{
return false;
}
}
window.onload = zoxadGetMsg;
window.onresize = zoxadResizeDiv;
window.onerror = function(){}
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function zoxadGetMsg()
{
try{
divTop = parseInt(document.getElementById("zoxadPlayer").style.top,10)
divLeft = parseInt(document.getElementById("zoxadPlayer").style.left,10)
divHeight = parseInt(document.getElementById("zoxadPlayer").offsetHeight,10)
divWidth = parseInt(document.getElementById("zoxadPlayer").offsetWidth,10)
docWidth = de.clientWidth;
docHeight = de.clientHeight;
document.getElementById("zoxadPlayer").style.top = parseInt(de.scrollTop,10) + docHeight + 10;
document.getElementById("zoxadPlayer").style.left = parseInt(de.scrollLeft,10) + docWidth - divWidth
document.getElementById("zoxadPlayer").style.visibility="visible"
objTimer = window.setInterval("zoxadMoveDiv()",10)
}
catch(e){}
}
function zoxadResizeDiv()
{
i+=1
try{
divHeight = parseInt(document.getElementById("zoxadPlayer").offsetHeight,10)
divWidth = parseInt(document.getElementById("zoxadPlayer").offsetWidth,10)
docWidth = de.clientWidth;
docHeight = de.clientHeight;
document.getElementById("zoxadPlayer").style.top = docHeight - divHeight + parseInt(de.scrollTop,10)
document.getElementById("zoxadPlayer").style.left = docWidth - divWidth + parseInt(de.scrollLeft,10)
}
catch(e){}
}
function zoxadMoveDiv()
{
try
{
if(parseInt(document.getElementById("zoxadPlayer").style.top,10) <= (docHeight - divHeight + parseInt(de.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval("zoxadResizeDiv()",1)
}
divTop = parseInt(document.getElementById("zoxadPlayer").style.top,10)
document.getElementById("zoxadPlayer").style.top = divTop - 2
}
catch(e){}
}
function closezoxadad()
{
document.getElementById('zoxadPlayer').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}
//document.write(iframeResource);
document.write("<div id='zoxadPlayer' style='z-index:99999;left:0px;top:0px;height:160px;width:256px;visibility:hidden;position:absolute;'><iframe src='ad.html' frameborder='0' scrolling='no' width='256px' height='160px'></iframe></div>");
window.setInterval("closezoxadad()",15000);
