我做了图片轮换显示,在protpage里可以实现,但在网页中无法实现,只显示一个图片。
代码如下,求助!!!!!!!!!!!
<%
sub index_images(images_type)
Set rs=Server.CreateObject("ADODB.RecordSet")
sql="select top 5 * from images where class='"& images_type &"' order by time_images desc "
rs.open sql,conn,1,1
%>
<table width="195" height="125" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> <div id=oTransContainer
style="FILTER: progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0, motion='forward'); WIDTH: 165px; HEIGHT: 103px"><a href="../tqtx/index.asp?class=<%=rs("class")%>" target="_blank"><img class=pic id=oDIV1 src="<%=rs("adress_images")%>" width=195 height=150>
<script>var NowFrame = 1;var MaxFrame = 5;var bStart = 0;function fnToggle(){var next = NowFrame + 1;if(next == MaxFrame+1) {NowFrame = MaxFrame;next = 1;}if(bStart == 0){bStart = 1;setTimeout('fnToggle()', 2000);return;}else{oTransContainer.filters[0].Apply();document.images['oDIV'+next].style.display = "";document.images['oDIV'+NowFrame].style.display = "none";oTransContainer.filters[0].Play(duration=2);if(NowFrame == MaxFrame){NowFrame = 1;}else{NowFrame++;}} setTimeout('fnToggle()', 6000);}fnToggle();</script>
</a>
<%
rs.movenext
%>
<a href="../tqtx/index.asp?class=<%=rs("class")%>" target="_blank"><img class=pic id=oDIV2 src="<%=rs("adress_images")%>" width=195 height=150 style="DISPLAY: none;"></a>
<%
rs.movenext
%>
<a href="../tqtx/index.asp?class=<%=rs("class")%>" target="_blank"><img class=pic id=oDIV3 src="<%=rs("adress_images")%>" width=195 height=150 style="DISPLAY: none;"></a>
<%
rs.movenext
%>
<a href="../tqtx/index.asp?class=<%=rs("class")%>" target="_blank"><img class=pic id=oDIV4 src="<%=rs("adress_images")%>" width=195 height=150 style="DISPLAY: none;"></a>
<%
rs.movenext
%>
<a href="../tqtx/index.asp?class=<%=rs("class")%>" target="_blank"><img class=pic id=oDIV5 src="<%=rs("adress_images")%>" width=195 height=150 style="DISPLAY: none;"></a>
</div></td>
</tr>
</table>
<%
rs.close
set rs=nothing
end sub
%>