JS+CSS打造随滚动条滚动的在线客服工具条

代码内容:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>JS+CSS打造随滚动条滚动的在线客服工具条_网页代码站(www.webdm.cn)</title>
</head>
<body>

<div id="divStayTopright" style="position:absolute; z-index:999"> 

<a href="http://www.webdm.cn/" title="返回主页"><img border=0  src="http://www.webdm.cn/images/20100921/back_home.gif" ></a><br>

<a href="javascript:window.external.addFavorite('http://www.webdm.cn/','网页代码站');" title="收藏本站"><img border=0  

src="http://www.webdm.cn/images/20100921/icon_bookmark.gif" ></a><br>

<a href="mailto:xixi9000@gmail.com" title="给客服发送邮件"><img border=0  src="http://www.webdm.cn/images/20100921/icon_mail_phone.gif" ></a><br>

<a href="http://wpa.qq.com/msgrd?V=1&Uin=15995909&Site=www.izhu.com&Menu=yes" target="_blank" title="客服""><img 

src="http://www.webdm.cn/images/20100921/qq_12606688_on.gif" border="0" align="absmiddle"></a><br>

<a href="msnim:chat?contact=lianjxeyou@hotmail.com" target="_blank" title="客服"><img src="http://www.webdm.cn/images/20100921/icon_msn.gif" border="0" 

align="absmiddle"></a><br>

<a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=guoguoshopcn&site=cntaobao&s=2&charset=utf-8" ><img border="0" 

src="http://www.webdm.cn/images/20100921/icon_wangwang.gif" alt="客服" /></a><br>

<a href="#top" title="返回页顶"><img border="0" src="http://www.webdm.cn/images/20100921/top.gif"></a><br>  

</div> 

<SCRIPT type=text/javascript>
var verticalpos="frombottom"
function JSFX_FloatTopDiv()
{
var startX =0,
startY = 459;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id)
{
  var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.divs[id];
  if(d.divs)el.style=el;
  el.sP=function(x,y){this.style.right=x;this.style.top=y;};
  el.x = startX;
  if (verticalpos=="fromtop")
  el.y = startY;
  else{
  el.y = ns ? pageYOffset + innerHeight : document.documentElement.scrollTop + 
document.documentElement.clientHeight;
  el.y -= startY;
  }
  return el;
}
window.stayTopright=function()
{
  if (verticalpos=="fromtop"){
  var pY = ns ? pageYOffset : document.documentElement.scrollTop;
  ftlObj.y += (pY + startY - ftlObj.y)/8;
  }
  else{
  var pY = ns ? pageYOffset + innerHeight : document.documentElement.scrollTop + 
document.documentElement.clientHeight;
  ftlObj.y += (pY - startY - ftlObj.y)/8;
  }
  ftlObj.sP(ftlObj.x, ftlObj.y);
  setTimeout("stayTopright()", 10);
}
ftlObj = ml("divStayTopright");
stayTopright();
}
JSFX_FloatTopDiv();
</SCRIPT>

<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"></p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
<p align="center"> </p>
</body>
</html>
<br>
<p><a href="http://www.webdm.cn">网页代码站</a> - 最专业的代码下载网站 - 致力为中国站长提供有质量的代码!</p>

代码来自:http://www.webdm.cn/webcode/912dc416-cfa0-4cf6-bddb-b1442f36795b.html
posted @ 2011-06-30 09:48  网页代码站  阅读(393)  评论(0编辑  收藏  举报