标题:关于新闻滚动
取消只看楼主
万光海
Rank: 3Rank: 3
来 自:桂林
等 级:论坛游侠
帖 子:92
专家分:133
注 册:2012-10-21
结帖率:68.75%
已结贴  问题点数:20 回复次数:0 
关于新闻滚动
为什么我按照这样写,他无法实现滚动了?求解!
<script type ="text/javascript">
         var speed3 = 30
         m3.innerHTML = mtext3.innerHTML
         function Marquee3() {
             if (m3.offsetTop - maq3.scrollTop <= 0)
                 maq3.scrollTop -= mtext3.offsetHeight
             else {
                 maq3.scrollTop++
             }
         }
         var MyMar3 = setInterval(Marquee3, speed3)
         maq3.onmouseover = function () { clearInterval(MyMar3) }
         maq3.onmouseout = function () { MyMar3 = setInterval(Marquee3, speed3) }
                         </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
        <table class="style1">
            <tr>
                <td>
                    <table class="style1">
                        <tr>
                            <td align="center">
                                滚动新闻</td>
                        </tr>
                        <tr>
                            <td>
                             <div id="maq3" style="overflow:hidden;height:298px;width:100%;">
                              <div id="mtext3">
                                   <asp:DataList ID="DataList2" runat="server" Height="134px" Width="215px">
                                      <ItemTemplate>
                                        <table class="tab_c" cellpadding="0" cellspacing="0" style="width:215px; height: 5px;">
                                         <tr>
                                         <td align ="left"
                                                 style="padding-right: 0px; padding-left: 0px; padding-bottom: 0px; padding-top: 3px; font-family: 宋体, Arial, Helvetica, sans-serif; font-size: 13px; color: #483F42;">   
                                             ·<a
                                            href='GunDongNews.aspx?t_id=<%# DataBinder.Eval(Container.DataItem,"id") %>' target='blank'><asp:Label
                                               ID="Label4" runat="server"
                                               Text='<%# DataBinder.Eval(Container.DataItem,"title") %>'></asp:Label>
                                           </a>
                                         </td>                                                                           
                                          </tr>
                                         </table>                                   
                                        </ItemTemplate>
                                     </asp:DataList>                                    
                              </div>                           
                              <div id="m3"> </div>
                         </div>
搜索更多相关主题的帖子: function javascript 
2013-10-11 22:27



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-421750-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.270126 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved