中国民营经济占比2016:!~~ASP高手进!~~~~~在线等!
来源:百度文库 编辑:高考问答 时间:2024/08/30 08:55:41
原代码如下:
<%
set rs=conn.execute("Select *, Towid,title,synopsis,nkey,gg01,gg02,defaultpic from news_info where pic= 1 and flag=0 and audit=0 and classid=23 and pagenum<2 order by towid desc")
if Rs.eof and Rs.bof then
response.Write("<table cellpadding=0 cellspacing=5 border=0 align=center>")
response.Write("<tr><td><div align=center style='line-height:200%'>")
response.Write("<li>暂无数据</li>")
response.Write("<li>请先提交数据</li>")
response.Write("</div></td></tr></table>")
else
dim i
i=0
response.Write("<table width=450 align=center cellpadding=0 cellspacing=0 border=0><tr>")
do while not rs.eof
i=i+1
response.write("<td align=center height=140 class=h2><a href='newsdetail.asp?id="&rs(0)&"'><img src="&rs(6)&" border=0 width=120 height=95 class=img1>")
response.write("<br><br><a href='newsdetail.asp?id="&rs(0)&"' class=a4>"&rs(1)&"</a></td>")
if (i mod 3)=0 then
response.write("</tr><tr><td height=10></td></tr>")
end if
rs.movenext
loop
response.Write("</table>")
rs.close
end if
%>
唉 等了一下午就是没人能解决 看来还是要靠自己了
<!--滚动代码开始-->
<div id=demo style="OVERFLOW: hidden; WIDTH: 550px; HEIGHT: 120px">
<table cellPadding=0 align=left border=0 cellspace="0">
<tr>
<td id=demo11 vAlign=top>
<!--{$GetPicArticle(ChannelID,131,false,0,14,false,false,0,1,1,120,90,30,0,false,14)}--></td>
<td id=demo12 vAlign=top></td>
</tr>
</table>
</div>
<SCRIPT>
var speed=15
demo12.innerHTML=demo11.innerHTML
function Marquee11(){
if(demo12.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo11.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar1=setInterval(Marquee11,speed)
demo.onmouseover=function() {clearInterval(MyMar1)}
demo.onmouseout=function() {MyMar1=setInterval(Marquee11,speed)}
</SCRIPT>
<!--滚动代码结束-->
<%
set rs=conn.execute("Select *, Towid,title,synopsis,nkey,gg01,gg02,defaultpic from news_info where pic= 1 and flag=0 and audit=0 and classid=23 and pagenum<2 order by towid desc")
if Rs.eof and Rs.bof then
response.Write("<table cellpadding=0 cellspacing=5 border=0 align=center>")
response.Write("<tr><td><div align=center style='line-height:200%'>")
response.Write("<li>暂无数据</li>")
response.Write("<li>请先提交数据</li>")
response.Write("</div></td></tr></table>")
else
dim i
i=0
response.Write("<table width=450 align=center cellpadding=0 cellspacing=0 border=0><tr>")
do while not rs.eof
i=i+1
response.write("<td align=center height=140 class=h2><a href='newsdetail.asp?id="&rs(0)&"'><img src="&rs(6)&" border=0 width=120 height=95 class=img1>")
response.write("<br><br><a href='newsdetail.asp?id="&rs(0)&"' class=a4>"&rs(1)&"</a></td>")
if (i mod 3)=0 then
response.write("</tr><tr><td height=10></td></tr>")
end if
rs.movenext
loop
response.Write("</table>")
rs.close
end if
%>
1、用<marquee>的时候只要修改direction="left"的值为UP,或DOWN就可以实现土坯那向上滚动或者向下滚动了!
这个问题应该和调用javascript有关的。
和asp只有间接的关系,可以写一段javascript的代码来实现单张图片滚动效果,然后再和调用数据库的asp代码进行嵌套,使其成为多幅滚动功能。