当前位置:编程学习 > asp >>

图片无缝滚动

<div id=demo style="overflow:hidden;height:310px;width:236px">
<div id=demo1>
<table border="0" cellpadding="0" cellspacing="0" width="236" align="center">
<%
set rsLink=conn.execute("select * from FriendSite where IsOK=true order by id desc")
if rsLink.eof then
%>
<tr><td align="center"><font color="#FF0000">暂时没有数据</font></td></tr>
<%
else
do while not rsLink.eof
%>
<tr>
<td align="center">
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr><td align="left"><%
if rsLink("LinkType")=1 then
    if rsLink("LogoUrl")<>"" and rsLink("LogoUrl")<>"http://www.226500.cn" then
        if lcase(right(rsLink("LogoUrl"),3))="swf" then
            Response.Write "<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='116' height='31' class='yqbian'>"
            Response.Write "<param name='movie' value='" & rsLink("ImgUrl") & "'><param name='quality' value='high'><embed src='" & rsLink("LogoUrl") & "' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='116' height='31' class='yqbian'></embed></object>"
        else
            response.write "<a href='" & rsLink("SiteUrl") & "' target='_blank' title='" & rsLink("LogoUrl") & "'><img src='" & rsLink("LogoUrl") & "' width='116' height='31' border='0' class='yqbian'></a>"
          end if
    else
        response.write "<a href='" & rsLink("SiteUrl") & "' target='_blank'><img src='images/nologo.gif' width='116' height='31' border='0' class='yqbian'></a>"
    end if
else
    response.write " "
end if
%></td></tr>
<tr><td height="10"></td></tr>
</table>
</td>
</tr>
<%
rsLink.movenext
loop
end if
set rsLink=nothing
%>www.226500.cn
</table>
</div>
<div id=demo2></div>
</div>
<script>
var t=demo.scrollTop
demo2.innerHTML=demo1.innerHTML
function nudeangelMarquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else
demo.scrollTop++
}
var repeat=setInterval(nudeangelMarquee,100);
demo.onmouseover=function() {clearInterval(repeat);}
demo.onmouseout=function() {repeat=setInterval(nudeangelMarquee,100);}
</script>

补充:asp教程,ASP入门
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,