<style>
#xiangshangdemo1{
height:auto;
text-align:left;
}
#xiangshangdemo2{
height:auto;
text-align:left;
}
#xiangshangdemo1 li{
list-style-type:none;
height:auto;
width:155px;
text-align:left;
}
#xiangshangdemo2 li{
list-style-type:none;
height:auto;
width:155px;
text-align:left;
padding-right:15px;
}
</style>
<div id="xiangshangdemo" style="overflow:hidden;height:145px;width:155px;margin-left:14px;">
<ul id="xiangshangdemo1">
<%set rs=server.CreateObject("Adodb.recordset")
sql="select * from product where bigclassname='香江之窗' order by ArticleID desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.Write"暂无内容"
else
do while not rs.eof%>
<li><table cellpadding="0" cellspacing="0" border="0" width="155"><tr><td width="155" height="22"><img src="img/jiantou.jpg" align="absmiddle" /> <a title="<%=rs("title")%>" href="Articleshow.asp?ArticleID=<%=rs("ArticleID")%>"><%=left(rs("Title"),20)%>...</a></td></tr></table></li>
<%rs.movenext
loop
end if
rs.close
set rs=nothing%>
</ul>
<ul id="xiangshangdemo2"></ul>
</div>
<script>
var xiangshangspeed=40
var xiangshangdemo=document.getElementById("xiangshangdemo");
var xiangshangdemo2=document.getElementById("xiangshangdemo2");
var xiangshangdemo1=document.getElementById("xiangshangdemo1");
xiangshangdemo2.innerHTML=xiangshangdemo1.innerHTML
function xiangshangMarquee(){
if(xiangshangdemo2.offsetTop-xiangshangdemo.scrollTop<=0)
xiangshangdemo.scrollTop-=xiangshangdemo1.offsetHeight
else{
xiangshangdemo.scrollTop++
}
}
var xiangshangMyMar=setInterval(xiangshangMarquee,xiangshangspeed)
xiangshangdemo.οnmοuseοver=function() {clearInterval(xiangshangMyMar)}
xiangshangdemo.οnmοuseοut=function() {xiangshangMyMar=setInterval(xiangshangMarquee,xiangshangspeed)}
</script>