查看: 1825|回复: 1
收起左侧

随县论坛QQ在线客服JS代码,自适应漂浮在网页右侧

[复制链接]
发表于 2012-6-27 12:18:08 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转随县论坛。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  4. <title>QQ在线客服</title>
  5. </head>
  6. <body>
  7. <DIV id=divStay style="POSITION: absolute">
  8. <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  9. <TBODY>
  10. <TR>
  11. <TD vAlign=top width="7%"></TD></TR></TBODY></TABLE></DIV>
  12. <SCRIPT language=javascript>
  13. function picsize(obj,MaxWidth){
  14. img=new Image();
  15. img.src=obj.src;
  16. if (img.width>MaxWidth)
  17. {
  18. return MaxWidth;
  19. }
  20. else
  21. {
  22. return img.width;
  23. }
  24. }
  25. function CloseQQ()
  26. {
  27. divStayTopleft.style.display="none";
  28. return true;
  29. }
  30. var online= new Array();
  31. </SCRIPT>
  32. <div id="divStayTopleft" style="POSITION: absolute">
  33. <table cellspacing="0" cellpadding="0" width="109" border="0">
  34. <tr>
  35. <td colspan="3">
  36. <a onclick="CloseQQ()" href="javascript:;" shape="circle" coords="91,16,12">
  37. <img height="34" src="http://www.codefans.net/jscss/demoimg/qq_top.gif" width="109" usemap="#Map" border="0"></a></td>
  38. </tr>
  39. <tr>
  40. <td width="6"><img height="100" src="http://www.codefans.net/jscss/demoimg/qq_life.gif" width="6"></td>
  41. <td valign="top" width="96" background="sto/qq_bg.gif">
  42. <table cellspacing="0" cellpadding="0" width="90" align="center" border="0">
  43. <tr>
  44. <td height="30">
  45. <table cellspacing="0" cellpadding="0" width="90" border="0">
  46. <tr>
  47. <td>
  48. <img height="13" src="http://www.codefans.net/jscss/demoimg/qq_ico1.gif" width="16"><span class="font_12">
  49. <span style="font-size: 12px">在线客服</span></span></td>
  50. </tr>
  51. </table>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td>
  56. <table border="0" width="100%" cellpadding="2" id="table47">
  57. <tr>
  58. <td width="15" valign="top" height="23">
  59. <img border="0" src="http://www.codefans.net/jscss/demoimg/qq_v01.gif" width="16" height="16"></td>
  60. <td valign="bottom"><script>document.write("<a target=blank href=tencent://message/?uin=894900898&Site=随县论坛&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:894900898:10 alt=[随县论坛]></a>");</script></td>
  61. </tr>
  62. </table>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td></td>
  67. </tr>
  68. <tr>
  69. <td>
  70. <table border="0" width="100%" cellpadding="2" id="table47">
  71. <tr>
  72. <td width="15" valign="top" height="23">
  73. <img border="0" src="http://www.codefans.net/jscss/demoimg/qq_n01.gif" width="16" height="16"></td>
  74. <td valign="bottom"><script>document.write("<a target=blank href=tencent://message/?uin=894900898&Site=随县论坛&Menu=yes><img border=0 SRC=http://wpa.qq.com/pa?p=1:894900898:10 alt=[随县论坛]></a>");</script></td>
  75. </tr>
  76. </table>
  77. </td>
  78. </tr>
  79. <tr>
  80. <td></td>
  81. </tr>
  82. </table>
  83. </td>
  84. <td width="7"><img height="100" src="http://www.codefans.net/jscss/demoimg/qq_right.gif" width="7"></td>
  85. </tr>
  86. <tr>
  87. <td colspan="3">
  88. <img height="30" src="http://www.codefans.net/jscss/demoimg/qq_bottom1.gif" width="109"></td>
  89. </tr>
  90. <tr>
  91. <td colspan="3"><a href="http://www.codefans.net" target="_blank"><img height="33" src="http://www.codefans.net/jscss/demoimg/qq_logo.gif" width="109" border="0"></a></td>
  92. </tr>
  93. </table>
  94. </div>
  95. <script type="text/javascript">
  96. function FloatTop()
  97. {
  98. var startX1 =document.body.offsetWidth-125 ,startY1 = 5;
  99. var startX2 =0,startY2 = 95;
  100. var ns = (navigator.appName.indexOf("Netscape") != -1);
  101. var d = document;
  102. function ml(id,startX,startY)
  103. {
  104. var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
  105. if(d.layers)el.style=el;
  106. el.sP=function(x,y){this.style.left=x;this.style.top=y;};
  107. el.x = startX;
  108. el.y = startY;
  109. return el;
  110. }
  111. window.stayTopLeft=function()
  112. {
  113. var pY = ns ? pageYOffset : document.body.scrollTop;
  114. ftlObj.y += (pY + startY1 - ftlObj.y)/8;
  115. ftlObj1.y += (pY + startY2 - ftlObj1.y)/8;
  116. ftlObj.sP(document.body.scrollLeft+document.body.offsetWidth-125, ftlObj.y);
  117. ftlObj1.sP(ftlObj1.x, ftlObj1.y);
  118. setTimeout("stayTopLeft()", 30);
  119. }
  120. ftlObj = ml("divStay",(document.body.scrollLeft+document.body.offsetWidth)/2+379,0);
  121. ftlObj1 = ml("divStayTopLeft",(document.body.scrollLeft+document.body.offsetWidth)/2+379,30);
  122. stayTopLeft();
  123. }
  124. FloatTop();
  125. </script>
  126. <!--End -->
  127. <table><tr><td height="800"></td></tr></table>
  128. </body>
  129. </html>
复制代码

随县论坛QQ在线客服JS代码,自适应漂浮在网页右侧在线客服,html,function,content,return 该贴已经同步到 ℡幽月╃冰心的微博
头像被屏蔽
发表于 2012-10-3 02:10:37 | 显示全部楼层
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

快速入职
隐私保护
薪资透明
信息可靠
手机找工作

快速回复 返回顶部 返回列表