| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 867 人关注过本帖
标题:[求助]asp+文字滚动效果
只看楼主 加入收藏
sydpoechang
Rank: 1
等 级:新手上路
帖 子:115
专家分:0
注 册:2007-8-22
收藏
 问题点数:0 回复次数:3 
[求助]asp+文字滚动效果
<style type="text/css">
#infozone{font-size:12px;color:#000;overflow:hidden;width:200px;height:20px;}
#infozone div{height:20px;line-height:20px;white-space:nowrap;overflow:hidden;}
</style>
<script type="text/javascript">
window.onload=function(){
 var o=document.getElementById('infozone');
 window.setInterval(function(){scrollup(o,20,0);},2000);
}

function scrollup(o,d,c){
 if(d==c){
  var t=o.firstChild.cloneNode(true);
  o.removeChild(o.firstChild);
  o.appendChild(t);
  t.style.marginTop=o.firstChild.style.marginTop='0px';
 }
 else{
  var s=3,c=c+s,l=(c>=d?c-d:0);
  o.firstChild.style.marginTop=-c+l+'px';
  window.setTimeout(function(){scrollup(o,d,c-l)},100);
 }
}
</script>
<meta name="keyword" content="<%=Gaobei_keywords%>">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="other/style.css" rel="stylesheet" type="text/css">
<SCRIPT language=javaScript src="Include/gaobei.js" type=text/javascript></SCRIPT>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>//文字滚动代码


<%
sqlgg="select top 2 * from Announce order by Time DESC"
    set rsgg=server.createobject("adodb.recordset")
    rsgg.open sqlgg,conn,1,1
if not rsgg.eof then
i=0
do while (not rsgg.eof) and (i < 2)
i=i+1
%>
<div  align="left"><a href="ggs.asp?id=<%=rsgg("id")%>"><%response.write mid(rsgg("Content"),1,55)%></a></div>
<%
rsgg.movenext
loop
else
response.write "<td align='center'>暂无消息</td>"
end if
rsgg.close
%></div>

数据库里面有两条数据 能滚动
但是滚动到第二条时 无法返回到第一条从新开始
请问各位大虾 这程序应该怎么改??
搜索更多相关主题的帖子: 效果 asp 文字 滚动 
2008-01-05 10:38
xiapi
Rank: 1
等 级:新手上路
威 望:2
帖 子:305
专家分:0
注 册:2006-10-11
收藏
得分:0 
多加几个进去试试,有的时候和数量有关系的

没有什么能够阻挡,我对自由的向往,天马行空的生涯一颗心了无牵挂。
2008-01-05 11:56
sydpoechang
Rank: 1
等 级:新手上路
帖 子:115
专家分:0
注 册:2007-8-22
收藏
得分:0 
多加了几条也没有
2008-01-05 13:28
lxn348567248
Rank: 1
等 级:新手上路
帖 子:21
专家分:0
注 册:2007-11-27
收藏
得分:0 
asp 文字滚动用marqueeb
这个比较长简单了.
2008-01-07 16:55
快速回复:[求助]asp+文字滚动效果
数据加载中...
 
   



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

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