| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 619 人关注过本帖
标题:关于新闻滚动
只看楼主 加入收藏
万光海
Rank: 3Rank: 3
来 自:桂林
等 级:论坛游侠
帖 子:92
专家分:133
注 册:2012-10-21
结帖率:68.75%
收藏
已结贴  问题点数:20 回复次数:1 
关于新闻滚动
为什么我按照这样写,他无法实现滚动了?求解!
<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
yms123
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:20 
实际网页生成的代码是什么样的啊?
2013-10-16 09:57
快速回复:关于新闻滚动
数据加载中...
 
   



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

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