Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[疑难] 高手帮忙,,小弟实在不懂程序,,在网上找到了这个程序,

[复制链接]
dz3snet 发表于 2009-12-16 12:40:38 | 显示全部楼层 |阅读模式
修改了QQ号,,,但是以前的显示是几个分类的,,现在我只需要一个分类,,,显示也只有一个了,,但脚本报错,,,,希望高手帮忙  去除不要的代码,对你们来说小菜一碟了,,,在下,十分感谢...      




<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
.qqbox a:link {
        color: #000;
        text-decoration: none;
}
.qqbox a:visited {
        color: #000;
        text-decoration: none;
}
.qqbox a:hover {
        color: #f80000;
        text-decoration: underline;
}
.qqbox a:active {
        color: #f80000;
        text-decoration: underline;
}

.qqbox{
        width:140px;
        height:auto;
        overflow:hidden;
        position:absolute;
        right:0;
        top:100px;
        color:#000000;
        font-size:12px;
        letter-spacing:0px;
}
.qqlv{
        width:25px;
        height:256px;
        overflow:hidden;
        position:relative;
        float:right;
        z-index:50px;
}
.qqkf{
        width:140px;
        height:auto;
        overflow:hidden;
        right:0;
        top:0;
        z-index:99px;
        border:6px solid #138907;
        background:#fff;
}
.qqkfbt{
        width:140px;
        height:20px;
        overflow:hidden;
        background:#138907;
        line-height:20px;
        font-weight:bold;
        color:#fff;
        position:relative;
        border:1px solid #9CD052;
        cursor:pointer;
        text-align:center;
}
.qqkfhm{
        width:140px;
        height:22px;
        overflow:hidden;
        line-height:22px;
        padding-right:8px;
        position:relative;
        margin:3px 0;
}
.bgdh{
        width:140px;
        padding-left:10px;
}
</style>
</head>
<body>
<div class="qqbox" id="divQQbox">
  <div class="qqlv" id="meumid" onmouseover="show()"><img

src="http://www.codefans.net/jscss/demoimg/200905/qq.gif"></div>
  <div class="qqkf" style="display:none;" id="contentid" onmouseout="hideMsgBox(event)">
    <div class="qqkfbt" onmouseout="showandhide('qq-','qqkfbt','qqkfbt','K',5,1);" id="qq-1"

onfocus="this.blur();">客 服 中 心</div>
    <div id="K1">
      <div class="qqkfhm bgdh"> <a href="tencent://message/?uin=6237711" title="三实数码科

技"><img src="http://wpa.qq.com/pa?p=1:6237711:4" border="0">三实数码科技</a><br/></div>
      <div class="qqkfhm bgdh"> <a href="tencent://message/?uin=6237712" title="开心农场"><img

src="http://wpa.qq.com/pa?p=1:6237712:4" border="0">开心农场</a></div>
      <div class="qqkfhm bgdh"> <a href="tencent://message/?uin=83510962" title="邓滔"><img

src="http://wpa.qq.com/pa?p=1:6237712:4" border="0">传奇客服</a></div>
      <div class="qqkfhm bgdh">手机:15882969658</div>
      <div class="qqkfhm bgdh">手机:13388209658</div>
      <div class="qqkfhm bgdh">座机:0818-8889715</div>
    </div>
<script language="javascript">
function showandhide(h_id,hon_class,hout_class,c_id,totalnumber,activeno) {
    var h_id,hon_id,hout_id,c_id,totalnumber,activeno;
    for (var i=1;i<=totalnumber;i++) {
        document.getElementById(c_id+i).style.display='none';
        document.getElementById(h_id+i).className=hout_class;
    }
    document.getElementById(c_id+activeno).style.display='block';
    document.getElementById(h_id+activeno).className=hon_class;
}
var tips;
var theTop = 100;
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;  
                  }
                  //http:
                  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();
        if(typeof(HTMLElement)!="undefined")//给firefox定义contains()方法,ie下不起作用
                {  
                  HTMLElement.prototype.contains=function (obj)  
                  {  
                          while(obj!=null&&typeof(obj.tagName)!="undefind"){//
               if(obj==this) return true;  
                       obj=obj.parentNode;
                       }  
                          return false;  
                  }
        }
function show()
{
        document.getElementById("meumid").style.display="none"
        document.getElementById("contentid").style.display="block"
}
        function hideMsgBox(theEvent){
          if (theEvent){
                var browser=navigator.userAgent;
                if (browser.indexOf("Firefox")>0){//Firefox
                    if (document.getElementById("contentid").contains(theEvent.relatedTarget)) {
                                return
                        }
                }
                if (browser.indexOf("MSIE")>0 || browser.indexOf("Presto")>=0){
                if (document.getElementById('contentid').contains(event.toElement)) {
                            return;//结束函式
                    }
                }
          }
          document.getElementById("meumid").style.display = "block";
          document.getElementById("contentid").style.display = "none";
        }
</script>
</body>
</html>
回复

使用道具 举报

bwjt123456789 发表于 2009-12-16 13:02:56 | 显示全部楼层
你懂的比我多   我帮不了你
回复

使用道具 举报

 楼主| dz3snet 发表于 2009-12-16 17:56:09 | 显示全部楼层
高手们,,不帮忙呀,,
回复

使用道具 举报

imfe 发表于 2009-12-17 00:01:25 | 显示全部楼层
本帖最后由 imfe 于 2009-12-17 00:05 编辑

{:2_119:} 抱歉,来迟了,呵呵,才看见……


  1. <meta http-equiv="content-type" content="text/html;charset=gb2312">
  2. <style type="text/css">
  3. .qqbox a:link {
  4.         color: #000;
  5.         text-decoration: none;
  6. }
  7. .qqbox a:visited {
  8.         color: #000;
  9.         text-decoration: none;
  10. }
  11. .qqbox a:hover {
  12.         color: #f80000;
  13.         text-decoration: underline;
  14. }
  15. .qqbox a:active {
  16.         color: #f80000;
  17.         text-decoration: underline;
  18. }

  19. .qqbox{
  20.         width:140px;
  21.         height:auto;
  22.         overflow:hidden;
  23.         position:absolute;
  24.         right:0;
  25.         top:100px;
  26.         color:#000000;
  27.         font-size:12px;
  28.         letter-spacing:0px;
  29. }
  30. .qqlv{
  31.         width:25px;
  32.         height:256px;
  33.         overflow:hidden;
  34.         position:relative;
  35.         float:right;
  36.         z-index:50px;
  37. }
  38. .qqkf{
  39.         width:140px;
  40.         height:auto;
  41.         overflow:hidden;
  42.         right:0;
  43.         top:0;
  44.         z-index:99px;
  45.         border:6px solid #138907;
  46.         background:#fff;
  47. }
  48. .qqkfbt{
  49.         width:140px;
  50.         height:20px;
  51.         overflow:hidden;
  52.         background:#138907;
  53.         line-height:20px;
  54.         font-weight:bold;
  55.         color:#fff;
  56.         position:relative;
  57.         border:1px solid #9CD052;
  58.         cursor:pointer;
  59.         text-align:center;
  60. }
  61. .qqkfhm{
  62.         width:140px;
  63.         height:22px;
  64.         overflow:hidden;
  65.         line-height:22px;
  66.         padding-right:8px;
  67.         position:relative;
  68.         margin:3px 0;
  69. }
  70. .bgdh{
  71.         width:140px;
  72.         padding-left:10px;
  73. }
  74. </style>
  75. </head>
  76. <body>
  77. <div class="qqbox" id="divQQbox">
  78.   <div class="qqlv" id="meumid" onmouseover="show()"><img

  79. src="http://www.codefans.net/jscss/demoimg/200905/qq.gif"></div>
  80.   <div class="qqkf" style="display:none;" id="contentid" onmouseout="hideMsgBox(event)">
  81.     <div class="qqkfbt" >客 服 中 心</div>
  82.     <div id="K1">
  83.       <div class="qqkfhm bgdh"> <a href="tencent://message/?uin=6237711" title="三实数码科

  84. 技"><img src="http://wpa.qq.com/pa?p=1:6237711:4" border="0">三实数码科技</a><br/></div>
  85.       <div class="qqkfhm bgdh"> <a href="tencent://message/?uin=6237712" title="开心农场"><img

  86. src="http://wpa.qq.com/pa?p=1:6237712:4" border="0">开心农场</a></div>
  87.       <div class="qqkfhm bgdh"> <a href="tencent://message/?uin=83510962" title="邓滔"><img

  88. src="http://wpa.qq.com/pa?p=1:6237712:4" border="0">传奇客服</a></div>
  89.       <div class="qqkfhm bgdh">手机:15882969658</div>
  90.       <div class="qqkfhm bgdh">手机:13388209658</div>
  91.       <div class="qqkfhm bgdh">座机:0818-8889715</div>
  92.     </div>
  93. <script language="javascript">
  94. function showandhide(h_id,hon_class,hout_class,c_id,totalnumber,activeno) {
  95.     var h_id,hon_id,hout_id,c_id,totalnumber,activeno;
  96.     for (var i=1;i<=totalnumber;i++) {
  97.         document.getElementById(c_id+i).style.display='none';
  98.         document.getElementById(h_id+i).className=hout_class;
  99.     }
  100.     document.getElementById(c_id+activeno).style.display='block';
  101.     document.getElementById(h_id+activeno).className=hon_class;
  102. }
  103. var tips;
  104. var theTop = 100;
  105. var old = theTop;
  106. function initFloatTips()
  107. {
  108.         tips = document.getElementById('divQQbox');
  109.         moveTips();
  110. }
  111. function moveTips()
  112. {
  113.                    var tt=50;
  114.                   if (window.innerHeight)
  115.                   {
  116.                 pos = window.pageYOffset  
  117.                   }else if (document.documentElement && document.documentElement.scrollTop) {
  118.                 pos = document.documentElement.scrollTop  
  119.                   }else if (document.body) {
  120.                     pos = document.body.scrollTop;  
  121.                   }
  122.                   //http:
  123.                   pos=pos-tips.offsetTop+theTop;
  124.                   pos=tips.offsetTop+pos/10;
  125.                   if (pos < theTop){
  126.                          pos = theTop;
  127.                   }
  128.                   if (pos != old) {
  129.                          tips.style.top = pos+"px";
  130.                          tt=10;//alert(tips.style.top);  
  131.                   }
  132.                   old = pos;
  133.                   setTimeout(moveTips,tt);
  134. }
  135. initFloatTips();
  136.         if(typeof(HTMLElement)!="undefined")//给firefox定义contains()方法,ie下不起作用
  137.                 {  
  138.                   HTMLElement.prototype.contains=function (obj)  
  139.                   {  
  140.                           while(obj!=null&&typeof(obj.tagName)!="undefind"){//
  141.                if(obj==this) return true;  
  142.                        obj=obj.parentNode;
  143.                        }  
  144.                           return false;  
  145.                   }
  146.         }
  147. function show()
  148. {
  149.         document.getElementById("meumid").style.display="none"
  150.         document.getElementById("contentid").style.display="block"
  151. }
  152.         function hideMsgBox(theEvent){
  153.           if (theEvent){
  154.                 var browser=navigator.userAgent;
  155.                 if (browser.indexOf("Firefox")>0){//Firefox
  156.                     if (document.getElementById("contentid").contains(theEvent.relatedTarget)) {
  157.                                 return
  158.                         }
  159.                 }
  160.                 if (browser.indexOf("MSIE")>0 || browser.indexOf("Presto")>=0){
  161.                 if (document.getElementById('contentid').contains(event.toElement)) {
  162.                             return;//结束函式
  163.                     }
  164.                 }
  165.           }
  166.           document.getElementById("meumid").style.display = "block";
  167.           document.getElementById("contentid").style.display = "none";
  168.         }
  169. </script>
  170. </body>
  171. </html>


复制代码
回复

使用道具 举报

 楼主| dz3snet 发表于 2009-12-17 13:07:14 | 显示全部楼层
谢谢呀    ,,现在不报错了,,,,,,((em:08))
回复

使用道具 举报

 楼主| dz3snet 发表于 2009-12-17 13:08:32 | 显示全部楼层
回复 4# imfe


    谢谢呀,,现在不报错了,,,                    我把这段代码是不是可以  直接加个网页里就可以使用了,,,,,,,,,,,,,好像还有一个层的问题,,,
回复

使用道具 举报

个性马甲 发表于 2009-12-17 13:19:31 | 显示全部楼层
tencent://message/?uin=6237712
。。。。。要添加好友 才能聊天的 哎

{:2_123:}
回复

使用道具 举报

張揚 发表于 2009-12-17 13:35:50 | 显示全部楼层
楼主是传奇客服?把你的服丢出来 我耍耍  哈哈```
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-17 04:27 , Processed in 0.117756 second(s), 14 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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