ASP non-gap Rolling]

Source: Internet
Author: User
 <div id=demo style="OVERFLOW: hidden; WIDTH: 770px; align: center">
<table border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#ECE9D8">
<tbody>
<tr bgcolor="#FFFFFF">
<td valign="top" id="marquePic1">
<table width="770" height="130" border="0" cellpadding="0" cellspacing="0">
<tr>
<%set rs=server.createobject("adodb.recordset")
sql="select top 8 * from SMT_cp where SMT_key=1 and SMT_key1=1 and SMT_key2=1 and SMT_key3=1 order by SMT_id desc"
rs.open sql,conn,1,1
n=0
do while not rs.eof
n=n+1
cpname=rs("SMT_cpname")%>
<td valign=top>
<table width="190" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center"><a href=cp_view.asp?id=<%=rs("SMT_id")%> target="_blank"></a></td>
</tr>
<tr>
<td align="center" bgcolor=#efefef style="border-top:1px #cccccc solid"><strong><a href=cp_view.asp?id=<%=rs("SMT_id")%> target="_blank" class=black><%=LeftT(cpname,12)%></a></strong></td>
</tr>
</table>
</td>
<%if n mod 9=0 then response.write"</tr><tr bgcolor=#ffffff>"
rs.movenext
loop
rs.close%>
</tr>
</table>
</td>
<td valign="top" id="marquePic2"></td>
</tr>
</tbody>
</table>
</div>
<script type=text/javascript>
var speed=30
marquePic2.innerHTML=marquePic1.innerHTML
function Marquee(){
if(demo.scrollLeft>=marquePic1.scrollWidth){
demo.scrollLeft=0
}else{
demo.scrollLeft++
}}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>

 

 

 

Instance

<div id=demo style="OVERFLOW: hidden; WIDTH: 420px; align: center"><table border="0" align="center" cellpadding="0" cellspacing="1"><tbody><tr bgcolor="#FFFFFF"><td valign="top" id="marquePic1"><table width="770" border="0" cellpadding="0" cellspacing="0">  <tr><%set rs_Product=server.createobject("adodb.recordset")    sqltext="select top 9 * from Product where Passed=True order by UpdateTime desc"    rs_Product.open sqltext,conn,1,1n=0do while not rs_Product.EOFn=n+1%><td valign=top ><table border="0" cellspacing="0" cellpadding="0" align="center"><tr><td align="center" width="118" height="92" align="center" valign="middle"><a href=ProductShow.asp?ID=<%=rs_Product("id")%> target="_blank"></a></td></tr><tr><td align="center" bgcolor=#efefef style="border-top:1px #cccccc solid"><strong><a href=Product_Show.asp?ID=<%=rs_Product("id")%> target="_blank" class=black><%=rs_Product("Title")%></a></strong></td></tr></table></td><%if n mod 9=0 and n<>9 then response.write"</tr><tr>"rs_Product.movenextlooprs_Product.close%></tr></table></td><td valign="top" id="marquePic2"></td></tr></tbody></table></div><script type=text/javascript> var speed=30 marquePic2.innerHTML=marquePic1.innerHTML function Marquee(){ if(demo.scrollLeft>=marquePic1.scrollWidth){ demo.scrollLeft=0 }else{ demo.scrollLeft++ }} var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script>  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.