分享一下在ecshop中实现浮动qq客服的js代码

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

分享一下在ecshop中实现浮动qq客服的js代码

/post/64.html

document.write("

");

document.write("

");

document.write("

在线咨询
");

document.write("

");

//

var tips; var theTop = 145/*这是默认高度,越大越往下*/; var old = theTop; function initFloatTips() {

tips = document.getElementById('divQQbox');

moveTips();

};

function moveTips() {

var tt=50;

if (window.innerHeight) {

pos = window.pageYOffset

}

else if (document.documentElement && document.documentElement.scrollTop) { pos = document.documentElement.scrollTop

}

else if (document.body) {

pos = document.body.scrollTop;

}

pos=pos-tips.offsetTop+theTop;

pos=tips.offsetTop+pos/10;

if (pos < theTop) pos = theTop;

if (pos != old) {

tips.style.top = pos+"px";

tt=10;

//alert(tips.style.top);

old = pos;

setTimeout(moveTips,tt);

}

//!]]>

initFloatTips();

function OnlineOver(){

document.getElementById("divMenu").style.display = "none"; document.getElementById("divOnline").style.display = "block"; document.getElementById("divQQbox").style.width = "145px"; }

function OnlineOut(){

document.getElementById("divMenu").style.display = "block"; document.getElementById("divOnline").style.display = "none"; }

function guan(){

document.getElementById("divMenu").style.display = "block"; document.getElementById("divOnline").style.display = "none"; OnlineOut();

相关文档
最新文档