JavaScript实现现非QQ在线客服功能
教程网3月25日整理
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head>
<title>QQ在线客服代码_懒人图库</title>
<style type="text/css">
/* CSS Document */
BODY {font-size:12px; margin:0px auto; padding:0px;border:0px;color:#000;}
a:link,a:visited{text-decoration:none;}
a:hover{text-decoration:underline;}
div,form,img,ul,ol,li,dl,dt,dd,em,i{padding:0px; border:0px;margin:0px auto;list-style:none;font-style:normal;}
img{vertical-align:top;}
</style>
</head>
<BODY>
<DIV id=divStay style="height:1500px"><br>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</DIV>
<DIV id=divStayTopleft style="POSITION: absolute;width:102px">
<div style="width:102px; height:200px;background:#ddd">
<div style="width:102px; height:170px;"><a href="#"><img src="images/kf_top.jpg"></a></div>
<div style="width:102px; height:30px;">
<SCRIPT>document.write("<a target=blank href=tencent://message/?uin=123456789&Site=在线客服&Menu=yes><img border=0 SRC=images/kf_foot.jpg alt=在线客服></a>");</SCRIPT>
</div>
</div>
</DIV>
<SCRIPT type=text/javascript>
convScrollAD('divStayTopleft',10,0);
function convScrollAD(id, _top, _left) {
var d=document,d1 = d.body,d2 = d.documentElement,
me = id.charAt ? d.getElementById(id) : id,cs=me.style,
page=/BackCompat/i.test(d.compatMode)?d1:d2;
d1.style.height = d2.style.height = '100%';
_top = _top || 10,_left = _left || -10;
var curTop=0;
cs[(_left > 0 ? 'left': 'right')] = _left ? Math.abs(_left) + 'px': 0;
cs.position = 'absolute';
setInterval(function() {
var to=page.scrollTop+_top;
if(curTop==to)return;
curTop+=Math.ceil((to-curTop)*.1);
cs.top = curTop + 'px';
},10 );
};
</SCRIPT>
<!--End: QQ在线客服 -->
</body>
</html>JavaScript教程/编