日期:2014-05-18  浏览次数:20431 次

大家帮我看看这段代码问题出在哪里,包含JS和ASP.NET代码的
我在开发网站的时候想实现一个滚动显示图片的功能,用的是VS2003,代码如下:
<table   height= "150 "   cellSpacing= "0 "   cellPadding= "0 "   width= "100% "   bgColor= "#ffffff "   border= "0 ">
<tr>
<td   vAlign= "top "> <asp:datalist   id= "DRecomeArt "   BorderWidth= "0px "   GridLines= "Horizontal "   RepeatDirection= "Horizontal "
Width= "1937px "   runat= "server ">
<AlternatingItemStyle   HorizontalAlign= "Center "> </AlternatingItemStyle>
<ItemStyle   HorizontalAlign= "Center "> </ItemStyle>
<ItemTemplate>
<DIV   id= "demos "   style= "WIDTH:   398;   HEIGHT:   194px "   runat= "server ">
<table   border= "0 ">
<tr>
<TD   id= "demos1 "   vAlign= "top ">
<TABLE   runat= "server "   borderColor= "#ffffff "   cellSpacing= "0 "   cellPadding= "0 "   border= "0 ">
<TR>
<td   align= "center "   width= "140 ">
<a   href= ' <%#   DataBinder.Eval   (Container.DataItem,   "ArtUrl ")   %> '> <img   src= ' <%#   DataBinder.Eval   (Container.DataItem,   "ImageUrl ")   %> '   class= "index_border01 "   onload= "return   imgzoom(this) "> </a>
</td>
</TR>
</TABLE>
</TD>
<TD   width= "3 "   id= "demos2 "> &nbsp; </TD>
<SCRIPT>  
      var   speed12=20      
      demos2.innerHTML=demos1.innerHTML  
      function   Marquee12(){  
      if(demos2.offsetWidth-demos.scrollLeft <=0)  
      demos.scrollLeft-=demos1.offsetWidth  
     
      else{  
      demos.scrollLeft++  
      }  
      }  
      var   MyMar12=setInterval(Marquee12,speed12)  
      demos.onmouseover=function()   {clearInterval(MyMar12)}  
      demos.onmouseout=function()   {MyMar12=setInterval(Marquee12,speed12)}  
</SCRIPT>
</tr>
</table>
</DIV>
</ItemTemplate>
</asp:datalist> </td>
</tr>
</table>

结果不是我想要的图片横向滚动,而是图片一字排开....
请教各位问题出在哪!图片的路径要从数据库里动态加载的,估计这是最麻烦的地方!

------解决方案--------------------
up
------解决方案--------------------
帮你顶一下
------解决方案--------------------
貌似LZ 这样说不太礼貌
------解决方案--------------------
up
------解决方案--------------------
jf up 学习
------解决方案--------------------