日期:2014-05-17  浏览次数:20960 次

如何提高js滚动速度 求大侠
<DIV id="scrollobj" style="white-space:nowrap;overflow:hidden;width:865px; line-height:43px;"><%Do While Not rs.Eof
Set Rs12 = Server.CreateObject("ADODB.RecordSet") 
Sql12 = "SELECT * FROM jiangpin where id ="&rs("jid")&"" 
Rs12.Open Sql12,Conn,1,1
do while not Rs12.eof %><span style="color:#FF0000">恭喜
<%
Set Rs123 = Server.CreateObject("ADODB.RecordSet") 
Sql123 = "SELECT * FROM hyk where hyk_uid ='"&rs("uname")&"'" 
Rs123.Open Sql123,Conn,1,1
do while not Rs123.eof
response.Write Rs123("hyk_dj")
Rs123.movenext
loop
Rs123.close
set Rs123=nothing
%>
会员:[<%=rs("uname")%>] 中得&sect;<%if Rs12("jp_dengji")=1 then
response.Write"特等奖"
elseif Rs12("jp_dengji")=2 then
response.Write"一等奖"
elseif Rs12("jp_dengji")=3 then
response.Write"二等奖"
elseif Rs12("jp_dengji")=4 then
response.Write"三等奖"
elseif Rs12("jp_dengji")=5 then
response.Write"四等奖"
elseif Rs12("jp_dengji")=6 then
response.Write"五等奖"
elseif Rs12("jp_dengji")=7 then
response.Write"六等奖"
end if%>&sect;【<%=Rs12("jp_name")%>】;&nbsp;&nbsp;&nbsp; </span><% Rs12.movenext
loop
rs.movenext
loop%></DIV>
<script language="javascript" type="text/javascript">
function scroll(obj) {
var tmp = (obj.scrollLeft)++;
if (obj.scrollLeft==tmp) obj.innerHTML += obj.innerHTML;
if (obj.scrollLeft>=obj.firstChild.offsetWidth) obj.scrollLeft=0;
}
setInterval("scroll(document.getElementById('scrollobj'))",1);
</script>
 
</div>

------解决方案--------------------
换个js
------解决方案--------------------
http://www.popub.net/script/MSClass.html

里面都有详细的说明