搜索

急求asp高手解决滚动图片问题,高分,在线等!

发布网友 发布时间:2024-10-23 18:20

我来回答

5个回答

热心网友 时间:2024-11-01 19:35

改好了
把下面的代码替换newspic.asp里所有代码即可
<%
Const New_img=10
set rs_article=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from article"
rs_article.open sqltext,conn,1,1
if not rs_article.EOF then%>
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

<div align='center' id='demo' style='overflow:hidden;height:125px;width:545px;'><!--滚动区的高度和宽度-->
<table align='center' cellpadding='0' cellspace='0' border='0'>
<tr>
<td id='demo1' valign='top'>
<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>
<tr valign='top'>
<%
while not rs_article.EOF
fileext=Right(rs_article("picurl"),4)
%>
<td align='center'>
<TABLE width=100% border=0 align=center cellPadding=0 cellSpacing=0>
<TR>
<TD width=8 rowspan=3 > </TD>
<TD vAlign=top width=8><img src='Images/bg_0ltop.gif' width=10 height=10></TD>
<TD background=images/bg_01.gif></TD>
<TD vAlign=top width=7><img src='Images/bg_0rtop.gif' width=10 height=10></TD>
<TD width=7 rowspan=3 vAlign=top> </TD>
</TR>
<TR>
<TD background='Images/bg_03.gif'> </TD>
<TD align="center" bgcolor="#E9E9E9">
<a href='Show.asp?ID=<%=rs_article("newsid")%>' target=_blank title='<%=rs_article("title")%>'>
<%if fileext=".jpg" or fileext=".bmp" or fileext=".png" or fileext=".gif" then%>
<img border="0" height="80" src="<%=rs_article("picurl")%>" width="105" alt="<%=rs_article("title")%>">
<%else
if fileext=".swf" then%>
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','width','105','height','84','src','<%=rs_article("picurl")%>','pluginspage','http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash','_cx','2778','_cy','2223','flashvars','value','movie','<%=rs_article("picurl")%>','wmode','Transparent','play','-1','loop','0','quality','High','salign','value','menu','-1','base','value','allowscriptaccess','value','scale','ShowAll','devicefont','0','embedmovie','0','bgcolor','value','swremote','value','moviedata','value','seamlesstabbing','1','profile','0','profileaddress','value','profileport','0','allownetworking','all' ); //end AC code
</script><noscript><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='105' height='84'>
<param name="_cx" value="2778">
<param name="_cy" value="2223">
<param name="FlashVars" value>
<param name="Movie" value="<%=rs_article("picurl")%>">
<param name="Src" value="<%=rs_article("picurl")%>">
<param name="WMode" value="Transparent">
<param name="Play" value="-1">
<param name="Loop" value="0">
<param name="Quality" value="High">
<param name="SAlign" value>
<param name="Menu" value="-1">
<param name="Base" value>
<param name="AllowScriptAccess" value>
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value>
<param name="SWRemote" value>
<param name="MovieData" value>
<param name="SeamlessTabbing" value="1">
<param name="Profile" value="0">
<param name="ProfileAddress" value>
<param name="ProfilePort" value="0">
<param name="AllowNetworking" value="all"><embed src="<%=rs_article("picurl")%>" width="105" height="84" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash">
</object></noscript>

<%end if
end if%></a>

</TD>
<TD background='Images/bg_04.gif'> </TD>
</TR>
<TR>
<TD><img src='Images/bg_0lbottom.gif' width=10 height=10></TD>
<TD><img src='Images/bg_02.gif'></TD>
<TD><img src='Images/bg_0rbottom.gif' width=10 height=10></TD>
</TR>
<TR>
<TD> </TD>
<TD colspan=3 align=center height=20 valign='top' background='Images/bg_05.gif'>
<a href='Show.asp?ID=<%=rs_article("newsid")%>' target=_blank title='<%=rs_article("title")%>'><%=cutstr(rs_article("title"),8)%></a>
</TD>
<TD> </TD>
</TR>
</TABLE>
</td>
<%
rs_article.MoveNext
wend
%>
</tr>
</table>
</td>
<td id=demo2 valign=top></td>
</tr>
</table>
</div>
<%if New_img >5 then%>
<script>
var Picspeed=15
demo2.innerHTML=demo1.innerHTML
function Marquee1(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,Picspeed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee1,Picspeed)}
</script>
<%end if
else
Response.Write "暂 无 最 新 图 文"
end if
rs_article.close
set rs_article=nothing
%>
<!--最新图文代码结束-->

热心网友 时间:2024-11-01 19:36

asp不是很强,看了半天也没看出来什么错误,我这也是显示不了,但是newspic.asp倒是可以看得有两张图片.

热心网友 时间:2024-11-01 19:36

呵呵,我下载了,一会帮你看看。

热心网友 时间:2024-11-01 19:37

我也下不了,帮不了你了

热心网友 时间:2024-11-01 19:38

都没法下载啊,怎么看啊
声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。
E-MAIL:11247931@qq.com
Top