下面是代码谢谢;
<table id="Table1" cellspacing="0"
cellpadding="0" border="0">
<tr>
<td>
<div id="demo" style="overflow: hidden; width: 650px; height: 100px" align="center"
designtimedragdrop="134">
<table>
<tr>
<td id="demo1" valign="middle">
<asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal">
<ItemTemplate>
<table id="Table2" cellspacing="0" cellpadding="0" width="102" border="0">
<tr>
<td>
<a href="Images.aspx?ID=<%# Eval("id")%>"><img src="admin/images/anli/<%#Eval("Src")%>"alt=""style="width:145px; height:106px;"></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList>
</td>
<td id="demo2" valign="top">
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
<script type="text/javascript">
var Picspeed = 5;
demo2.innerHTML = demo1.innerHTML;
function Marquee1() {
if (demo2.offsetWidth - demo.scrollLeft <=0)
demo.scrollLeft=0
else
demo.scrollLeft++
if()
}
var MyMar1 = setInterval(Marquee1, Picspeed);
demo.onmouseover = function () { clearInterval(MyMar1) }
demo.onmouseout = function () { MyMar1 = setInterval(Marquee1, Picspeed) }
</script>
五张图片会正常滚动,数据库放一张图片,那张图显示两张,什么原因啊 |