[url=http://zhidao.baidu.com/question/sbshow.asp?id=<%=rs(]<!--#include file="common/conn.asp"-->
<%
set rs=server.CreateObject("adodb.Recordset")
rs.open "Select * from [zhuanrang]",conn,1,1
%>
<div id=demo onmouseover="clearInterval(inter);" onmouseout="inter=setInterval(qswhMarquee,30);" style="overflow:hidden;height:100%; width:100%">
<div id=demo1>
<table width="100%" border=0 height="100%">
<tr>
<%
do while not rs.eof
%>
<td width="100%">
<table width="100" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="90" valign="top"><table width="100%" height="86%" border="1" cellpadding="0" cellspacing="0" bordercolor="#C6C7C6">
<tr>
<td height="92"><a href=sbshow.asp?id=<%=rs("id")%>&type=zhrang target="_blank"><img src="upfile/<%=rs("sbpic")%>" width="100" height="82" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td valign="top"><table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CECBCE">
<tr>
<td align="center"><%=rs("title")%></td>
</tr>
</table></td>
</tr>
</table>
</td>
<%i=i+1%>
<%if i mod 2=0 then%>
</tr>
<tr>
<%end if%>
<%
rs.movenext
loop
rs.close
set rs=nothing
conn.close
conn=nothing
%>
</table>
</div>
<div id=demo2></div>
<script>
var t=demo.scrollTop;
var inter;
while(demo.offsetHeight>demo.scrollHeight)demo2.innerHTML+=(demo1.innerHTML+"");
demo2.innerHTML+=demo1.innerHTML;
function qswhMarquee(){
if(demo2.offsetTop<=demo.scrollTop)
demo.scrollTop-=demo1.offsetHeight;
else
demo.scrollTop++;
}
inter=setInterval(qswhMarquee,30);
</script>
</div>
看看哪里错了。!!谢了
參考答案:[/url]<!--#include file="common/conn.asp"-->
<%
set rs=server.CreateObject("adodb.Recordset")
rs.open "Select * from [zhuanrang]",conn,1,1
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id=demo onmouseover="clearInterval(inter);" onmouseout="inter=setInterval(qswhMarquee,30);" style="overflow:hidden;height:100%; width:100%">
<div id=demo1>
<table width="100%" border=0>
<tr>
<%
do while not rs.eof
%>
<td width="100%"> <table width="100" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="90" valign="top"><table width="100%" height="86%" border="1" cellpadding="0" cellspacing="0" bordercolor="#C6C7C6">
<tr>
<td height="92"><a href=sbshow.asp?id=<%=rs("id")%>&type=zhrang target="_blank"><img src="upfile/<%=rs("sbpic")%>" width="100" height="82" border="0"></a></td>
</tr>
</table></td>
</tr>
<tr>
<td height="3"></td>
</tr>
<tr>
<td valign="top"><table width="100%" height="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#CECBCE">
<tr>
<td align="center"><%=rs("title")%></td>
</tr>
</table></td>
</tr>
</table></td>
<%i=i+1%>
<%if i mod 2=0 then%>
</tr>
</table>
</div>
<div id=demo2></div>
<script>
var t=demo.scrollTop;
var inter;
while(demo.offsetHeight>demo.scrollHeight)demo2.innerHTML+=(demo1.innerHTML+"");
demo2.innerHTML+=demo1.innerHTML;
function qswhMarquee(){
if(demo2.offsetTop<=demo.scrollTop)
demo.scrollTop-=demo1.offsetHeight;
else
demo.scrollTop++;
}
inter=setInterval(qswhMarquee,30);
</script>
</div>
你这样试一下.