标题:ASP加JS做的滚动条运行一断时间就停止了是什么问题啊
只看楼主
夜龙魂
Rank: 2
等 级:论坛游民
帖 子:130
专家分:65
注 册:2009-9-24
结帖率:57.14%
 问题点数:0 回复次数:1 
ASP加JS做的滚动条运行一断时间就停止了是什么问题啊
<div id="demo" style="OVERFLOW: hidden; WIDTH:200px; HEIGHT:400px; padding-top:0px;margin-left:45px;margin-bottom:0px;text-align: left;vertical-align:bottom">
                <div id="demo1" style="margin:0px;">
                <%
                set rs=server.CreateObject("adodb.recordset")
                sql="select * from Buyinfo order by adddate desc"
                rs.open sql,conn,1,1
                if rs.recordcount=0 then
                   response.Write("<tr><td colspan=3>暂时无定单……</td></tr>")
                   else
                   for i=0 to rs.pagesize
                if rs("sex")="1" then
                sex="先生"
                else
                sex="女士"
                end if
            %>
            <%
                address=left(rs("addr"),2)
                user=left(rs("user"),1)
            %>   
            <div style="margin-top:5px;"><span style="color:#FFFFFF; font-size:12px;"><%=address%><%=user%><%=sex%><%=rs("count")%>盒</span></div>
            <%
                rs.movenext
                if rs.eof then
                exit for
                end if
                next
                end if
            %>
                </div>
                <div id="demo2"></div>
            </div>
            <SCRIPT>
                    var rollspeed=50
                    demo2.innerHTML=demo1.innerHTML
                    function Marquee(){
                        if(demo2.offsetTop-demo.scrollTop<=0)
                        demo.scrollTop-=demo1.offsetHeight
                        else{
                        demo.scrollTop++
                        }
                    }

                    var MyMar=setInterval(Marquee,rollspeed)
                    demo.onmouseover=function() {clearInterval(MyMar)}
                    demo.onmouseout=function() {MyMar=setInterval(Marquee,rollspeed)}
                </SCRIPT>
搜索更多相关主题的帖子: 运行 滚动 ASP 时间 
2010-03-10 16:29
夜龙魂
Rank: 2
等 级:论坛游民
帖 子:130
专家分:65
注 册:2009-9-24
得分:0 
ASP加JS做的滚动条运行一断时间就停止了是什么问题啊
2010-03-11 08:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-299008-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.276051 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved