<div id="demo" style="overflow:hidden;height:200;width:100%; margin-left:12px; margin-right:12px; margin-top:3px;"> <table align="left" cellpadding="0" cellspace="0" border="0"> <tr> <td id="demo1" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <% set rs=server.CreateObject("adodb.recordset") sql="select top 16 id,name,smallpic from project order by id" rs.open sql,conn,1,1 do while not rs.eof %> <td style="padding-right:3px"> <table width="120" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" style="border:1px solid #cccccc"><table width="100%" border="0" cellspacing="4" cellpadding="0"> <tr> <td style="text-align:center"><a href="project_view.asp?id=<%=rs("id")%>" target="_blank"><img src='../<%=rs("smallpic")%>' border="0" title="<%=rs("name")%>" class="thumbImage" width='120' height='120' /></a></td> </tr> </table> </td> </tr> </table> </td> <% rs.movenext loop rs.close set rs=nothing %> </tr> </table></td> <td id="demo2" valign="top"></td> </tr> </table> </div><script> var speed=30 demo2.innerHTML=demo1.innerHTML function Marquee(){ if(demo2.offsetWidth-demo.scrollLeft<=0) demo.scrollLeft-=demo1.offsetWidth else{ demo.scrollLeft++ } } var MyMar=setInterval(Marquee,speed) demo.onmouseover=function() {clearInterval(MyMar)} demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)} </script> |