zoukankan      html  css  js  c++  java
  • 8.15 自定义tr行 滚动 信息行的滚动

                                  <table class="zixun-con-table">
                                      <tr class="hover">
                                          <th style="100px;"></th>
                                          <th style="120px;"></th>
                                          <th style="120px;"></th>
                                          <th style="120px;"></th>
                                          <th style="120px;"></th>
                                          <th style="100px;"></th>
                                      </tr>
                                  </table>
                                  <div id="demo0" style="680px;overflow:hidden;height:200px;">
                                      <div id="demo11" onmouseover="iii=1" style="680px;overflow:hidden;" onmouseout="iii=0" >
                                          <table class="zonghexinxi-table">
                                              <s:iterator value="zx15" status="s">
                                              <s:if test="#s.index>=0&&stopFlag!=2">
                                              <tr>
                                                  <td style="100px;"></td>
                                                  <td style="120px;" class="center stars zx15StarLevel" stars="${startlevel }"></td>
                                                  <td style="120px;"></td>
                                                  <td style="120px;"></td>
                                                  <td style="120px;">
                                                  </td>
                                                  <td style="100px;"></td>
                                              </tr>
                                              </s:if>
                                              </s:iterator>
                                          </table>
                                      </div>
                                      <div id="demo22" style="680px;overflow:hidden;"></div>
                                      <script type="text/javascript">
                                          var iii=0;t=demo11.clientHeight;
                                          demo22.innerHTML=demo11.innerHTML;
                                          zoumadeng('demo0','demo11','demo22','iii','60');
                                      </script>
                                  </div>
                              </div>
                          </div>
        //demo0:外围的div的id;demo11:第一层div的id; demo22;被复制div的id; length:demo11和demo22的id; flag指鼠标是否在div内
        
        function zoumadeng(demo0,demo11,demo22,flag,speed){    
            var m = $("#"+demo11).height()*2;
            if($("#"+demo0).height()<m){
                if($("#"+demo0).height()>$("#"+demo11).height()){
                    $("#"+demo11).height($("#"+demo0).height()+$("#"+demo11).height());
                    $("#"+demo22).height($("#"+demo0).height()+$("#"+demo11).height());
                }else{
                    $("#"+demo11).height($("#"+demo11).height());
                    $("#"+demo22).height($("#"+demo11).height());
                }
            }else{
                $("#"+demo11).height($("#"+demo0).height()+$("#"+demo11).height());
                $("#"+demo22).height($("#"+demo0).height()+$("#"+demo11).height());
            }
            var t = setInterval("qswhMarquee("+demo0+","+demo11+","+flag+")", speed);
            //$("#"+demo0).mouseover(function(){clearInterval(t);}, function(){t = setInterval("qswhMarquee("+demo0+","+demo11+","+flag+")", speed);});
            $("#"+demo0).mouseover(function(){clearInterval(t);});
            $("#"+demo0).mouseleave(function(){t = setInterval("qswhMarquee("+demo0+","+demo11+","+flag+")", speed);});
        }
        function qswhMarquee(demo0,demo11,flag){
            if(flag==1){
                return;
            }else{
                if(demo0.scrollTop==demo11.clientHeight){
                    demo0.scrollTop-=demo11.offsetHeight;
                }else{
                    demo0.scrollTop++;
                }
            }
        }
  • 相关阅读:
    shell与export命令
    mysql同步出现1062错误
    mysql命令行执行时不输出列名(字段名)
    python中中括号中的负数
    bash: ssh: command not found
    nagios的一些东西
    安装MySQLdb出现HAVE_WCSCOLL重定义问题的解决方法
    ImportError: No module named setuptools
    xp密钥
    破解MySQL和修改mysql的密码
  • 原文地址:https://www.cnblogs.com/zhangchenglzhao/p/3259120.html
Copyright © 2011-2022 走看看