var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 2px; position:fixed; TOP: 320px; width:130px'> "
if (online[0]==0) {
/*客服不在请留言*/
specialcode = specialcode + "<a href='tencent://message/?uin=1131923953&Site=请留言&Menu=yes'>";
specialcode = specialcode + "<img src='images/QQ/live.png' width='120' height='92' border='0'></a>";
}
else {
/*在线咨询*/
specialcode = specialcode + "<a href='tencent://message/?uin=1131923953&Site=在线即时交谈&Menu=yes'>";
specialcode = specialcode + "<img src='images/QQ/OffLine.png' width='120' height='92' border='0'></a>";
}
specialcode=specialcode+"</DIV>";
document.write(specialcode);
lastScrollY=0;
function heartBeat0(){
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0){
percent=Math.ceil(percent);
}else {
percent=Math.floor(percent);
}
document.all.searchspe.style.pixelTop += percent;
lastScrollY=lastScrollY+percent;
}
window.setInterval("heartBeat0()",1);
这个是js文件中的,新建一个js,网页引用(因为传不了附件了,所以,无奈之举)
在页面中还要添加一下代码:<script type="text/javascript"> var online = new Array();</script>
<script src="http://webpresence. type="text/javascript"></script>