qq悬浮临时对话窗口
a标签为自己申请代码
<!-- 漂浮QQ -->
<div id="backi" style="z-index: 2; width: 106px; position: absolute; top: 270px; height: auto;
right: 0"> <a href=" http://sighttp.qq.com/cgi-bin/check?sigkey=cbb95ee9c69806c69b98e598a0d0c3cb91a645376ecfc8c4518774db97ebd9f4"; target=_blank; onclick="var tempSrc=' http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=cbb95ee9c69806c69b98e598a0d0c3cb91a645376ecfc8c4518774db97ebd9f4';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC=' http://wpa.qq.com/pa?p=1:36847988:42' alt=""></a>
</div>
<!-- 结束漂浮QQ -->
<script language="javascript" type="text/javascript">
var w3c = (document.getElementById) ? true : false;
var agt = navigator.userAgent.toLowerCase();
var ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1) && (agt.indexOf("omniweb") == -1));
var mymovey = new Number();
function IeTrueBody() {
return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body;
}
function GetScrollTop() {
return ie ? IeTrueBody().scrollTop : window.pageYOffset;
}
</script>
<script language="JavaScript1.1">
function heartBeat(){
diffY=GetScrollTop();
mymovey += Math.floor((diffY-document.getElementById('backi').style.top.replace("px","")+270)*0.1);
document.getElementById('backi').style.top = mymovey+"px";
}
window.setInterval("heartBeat()",1);
</script>