
ASP代码,如何将代码的一行图片滚动变成两行,自己弄不好啊 20
代码如下<%subsy_npicgundong(top,Cla,Tlink,tj)setrs=conn.execute("selecttop"&top&"*frombdn...
代码如下
<%sub sy_npicgundong(top,Cla,Tlink,tj)
set rs=conn.execute("select top "&top&" * from bdnews where nb_id="&Cla&" and Fileurl<>'' and nws_tj="&tj&" and nws_stop=1 order by nws_id desc")
if rs.eof then
response.Write "无记录"
else%>
<DIV id=demo style="OVERFLOW: hidden; WIDTH: 733px;">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id=demo1>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div class="showCaseMain">
<ul>
<%do while not rs.eof
if len(rs("nws_title"))>6 then
nws_title=left(rs("nws_title"),6)&"..."
else
nws_title=rs("nws_title")
end if
%>
<li>
<a href="<%=Tlink%>?thex=<%=rs("nws_id")%>&Cla=<%=rs("nb_id")%>&Ncla=<%=rs("ns_id")%>&Clink=<%=Clink%>" target="_self"><img src="<%=replace(rs("Fileurl"),"../../","")%>" width="140" height="130" border="0">
<h4><strong> <%=rs("nws_title")%></strong></h4>
</a></li>
<%
rs.movenext
loop
%>
</ul>
</div></td>
</tr>
</table>
</td>
<td width="1" id=demo2 ></td>
</tr>
</table>
<SCRIPT>
var speed3=25//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed3)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed3)}
</SCRIPT>
</DIV>
<%end if
rs.close
set rs=nothing
%>
<%end sub%> 展开
<%sub sy_npicgundong(top,Cla,Tlink,tj)
set rs=conn.execute("select top "&top&" * from bdnews where nb_id="&Cla&" and Fileurl<>'' and nws_tj="&tj&" and nws_stop=1 order by nws_id desc")
if rs.eof then
response.Write "无记录"
else%>
<DIV id=demo style="OVERFLOW: hidden; WIDTH: 733px;">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id=demo1>
<table width="160" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div class="showCaseMain">
<ul>
<%do while not rs.eof
if len(rs("nws_title"))>6 then
nws_title=left(rs("nws_title"),6)&"..."
else
nws_title=rs("nws_title")
end if
%>
<li>
<a href="<%=Tlink%>?thex=<%=rs("nws_id")%>&Cla=<%=rs("nb_id")%>&Ncla=<%=rs("ns_id")%>&Clink=<%=Clink%>" target="_self"><img src="<%=replace(rs("Fileurl"),"../../","")%>" width="140" height="130" border="0">
<h4><strong> <%=rs("nws_title")%></strong></h4>
</a></li>
<%
rs.movenext
loop
%>
</ul>
</div></td>
</tr>
</table>
</td>
<td width="1" id=demo2 ></td>
</tr>
</table>
<SCRIPT>
var speed3=25//速度数值越大速度越慢
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed3)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed3)}
</SCRIPT>
</DIV>
<%end if
rs.close
set rs=nothing
%>
<%end sub%> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询