铁雪资源网 Design By www.gsvan.com

复制代码 代码如下:
<script language="JavaScript" type="text/javascript">
lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}

//alert(diffY);
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("ad_left").style.top=parseInt(document.getElementById

("ad_left").style.top)+percent+"px";
document.getElementById("ad_right").style.top=parseInt(document.getElementById

("ad_left").style.top)+percent+"px";

lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}
function hidead(num)
{
showad = false;
if(num==1)
document.getElementById("ad_left").style.display="none";
else if(num==2)
document.getElementById("ad_right").style.display="none";
}
var ClosebuttonHtml1 = '<div style="position: absolute;bottom:0px;right:25px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:void(0);" onclick="hidead(1)" style="color:#ffffff;text-decoration:none;font-size:12px;">关闭</a></div>';
var ClosebuttonHtml2 = '<div style="position: absolute;bottom:0px;right:25px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:void(1);" onclick="hidead(2)" style="color:#ffffff;text-decoration:none;font-size:12px;">关闭</a></div>';
ad1="<div id=/"ad_left/" style='right:10px;POSITION:absolute;TOP:160px;'></div>"
ad2="<DIV id=/"ad_right/" style='right:10px;POSITION:absolute;TOP:160px;'><br><a href='tencent://message/?uin=758541860&Menu=yes'><img height='120' src='../images/qq.gif' border='0' width='110'></a></div>";
document.write(ad1);
document.write(ad2);
window.setInterval("heartBeat()",1);
</script>

标签:
qq,悬浮代码

铁雪资源网 Design By www.gsvan.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
铁雪资源网 Design By www.gsvan.com

评论“qq悬浮代码(兼容各个浏览器)”

暂无qq悬浮代码(兼容各个浏览器)的评论...