新沂愿低健康管理有限公司

專業(yè)的廣州網(wǎng)站建設(shè)、廣州網(wǎng)站制作公司為您服務(wù),電話:020-85548809,29883069 手機(jī)訪問
微信關(guān)注
關(guān)注奇億廣州網(wǎng)站建設(shè)微信
網(wǎng)站導(dǎo)航
新聞中心
首頁>新聞中心>網(wǎng)頁設(shè)計

簡單又兼容的在線客服滾動代碼

添加時間:2013/2/12 13:27:23    編輯:奇億網(wǎng)站建設(shè)公司

我們經(jīng)常要用到在線客服代碼的站長估計會遇到,一般的在線客戶都是又復(fù)雜又多文件的,搞得浪費(fèi)時間找個半天在哪修改客服;好不容易找個簡單的在線客服代碼卻又發(fā)現(xiàn)不兼容各大瀏覽器,急得不知道用哪種在線客服滾動代碼是好。

下面廣州奇億建站為您介紹一種簡單又兼容的在線滾動客服代碼:

<div id="divStayTopright" style="position:absolute; z-index:999;width:90px;height:150px; right:0px;">
<a href="tencent://message/?uin=81233044&Site=廣州建站&Menu=yes" target="_blank"><img src="images/qq.gif" width=90 height=150 border=0 alt="廣州建站廣州網(wǎng)站建設(shè)在線客服"></a>
</div>
 
<script type="text/javascript">
//<![CDATA[
var tips; var theTop = 180/*這是默認(rèn)高度,越大越往下*/; var old = theTop;
function initFloatTips() {
  tips = document.getElementById('divStayTopright');
  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();
</script>

是吧,很簡單實(shí)用又兼容各大瀏覽器的在線客服滾動代碼吧。

鄂伦春自治旗| 杨浦区| 巴南区| 天镇县| 临漳县| 姜堰市| 浦江县| 峨边| 姜堰市| 临洮县| 台北县| 深泽县| 黄平县| 古田县| 大新县| 泊头市| 赤城县| 江孜县| 卢氏县| 绥中县| 怀远县| 永善县| 洪洞县| 额济纳旗| 罗田县| 探索| 屯门区| 鄂尔多斯市| 新邵县| 隆林| 新田县| 慈溪市| 增城市| 深泽县| 静安区| 方城县| 广昌县| 廉江市| 龙口市| 稷山县| 土默特右旗|