关于新闻滚动
为什么我按照这样写,他无法实现滚动了?求解! <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>