为什么用datalist制作图片特效没反应呢?
我做了一个图片流动的效果,给它静态的几张图片效果是出来的但是从数据库中读取出来,用datalist接受,图片不显示,没效果,请高手帮忙看下两段代码:
第一段:给多张图片的效果
<div align="center">
<!--滚动图片 start-->
<DIV class=rollphotos>
<DIV class=FixTitle>
<H3>旅游风景名胜</H3><SPAN><A href="/" target=_blank>更多>></A></SPAN></DIV>
<DIV class=blk_29>
<DIV class=LeftBotton id=LeftArr></DIV>
<DIV class=Cont id=ISL_Cont_1><!-- 图片列表 begin -->
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s1.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>中国北京</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s2.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>生态旅游区</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s3.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>奥运馆场</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s4.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>瑞典山脉</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s5.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>体育旅游</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s5.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>福建武山</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s6.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>中国张家界</A></P></DIV>
<DIV class=box><A class=imgBorder href="/" target=_blank><IMG height=84 src="/jscss/demoimg/wall_s7.jpg" width=124
border=0></A>
<P><A href="/"
target=_blank>奥运开幕式</A></P></DIV><!-- 图片列表 end --></DIV>
<DIV class=RightBotton id=RightArr></DIV></DIV>
<SCRIPT language=javascript type=text/javascript>
<!--//--><![CDATA[//><!--
var scrollPic_02 = new ScrollPic();
scrollPic_02.scrollContId = "ISL_Cont_1";
scrollPic_02.arrLeftId = "LeftArr";//左箭头ID
scrollPic_02.arrRightId = "RightArr"; //右箭头ID
scrollPic_02.frameWidth = 908;//显示框宽度
scrollPic_02.pageWidth = 152; //翻页宽度
scrollPic_02.speed = 10; //移动速度(毫秒,越小越快)
scrollPic_02.space = 10; //每次移动像素(单位px,越大越快)
scrollPic_02.autoPlay = false; //自动播放
scrollPic_02.autoPlayTime = 3; //自动播放间隔时间(秒)
scrollPic_02.initialize(); //初始化
//--><!]]>
</SCRIPT>
</DIV>
<!--滚动图片 end-->
第二段:从数据库中读取的代码
<!--滚动图片 start-->
<div class="rollphotos" style="width:133%">
<div class="FixTitle">
<h3>旅游风景名胜</h3><span><a href="/" target="_blank">更多>></a></span></div>
<div class="blk_29" style="left: 0px; top: 0px">
<div class="LeftBotton" id="LeftArr"></div>
<div class="Cont" id="ISL_Cont_1" style="width: 782px"><!-- 图片列表 begin -->
<asp:DataList ID="DataList1" runat="server" RepeatDirection="Horizontal" Height="234px" Width="114px">
<ItemTemplate>
<div class="box" style="height: 102px">
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#Eval("picture") %>' CommandArgument='<%#Eval("painterID") %>' Height="120px" Width="100px" />
<p><asp:LinkButton ID="LinkButton1" runat="server" Text='<%#Eval("pname") %>' CommandArgument='<%#Eval("painterID") %>' Height="120px" Width="100px"></asp:LinkButton></p></div>
</ItemTemplate>
</asp:DataList><!-- 图片列表 end --></div>
<div class="RightBotton" id="RightArr"></div></div>
<script language="javascript" type="text/javascript">
<!--//--><![CDATA[//><!--
var scrollPic_02 = new ScrollPic();
scrollPic_02.scrollContId = "ISL_Cont_1";
scrollPic_02.arrLeftId = "LeftArr";//左箭头ID
scrollPic_02.arrRightId = "RightArr"; //右箭头ID
scrollPic_02.frameWidth = 908;//显示框宽度
scrollPic_02.pageWidth = 152; //翻页宽度
scrollPic_02.speed = 10; //移动速度(毫秒,越小越快)
scrollPic_02.space = 10; //每次移动像素(单位px,越大越快)
scrollPic_02.autoPlay = true; //自动播放
scrollPic_02.autoPlayTime = 3; //自动播放间隔时间(秒)
scrollPic_02.initialize(); //初始化
//--><!]]>
</script>
</div>
<!--滚动图片 end-->