关于文学向上滚动的问题

liveingo 2008-11-18 10:28:15
在我的站点中有一个公告栏,开始是只滚动一条公告。所以没发现问题。后来由于公告量多了。想让它显示前15条进行滚动。但是现在显示出来中间会有很大一个空白,很难看。不知道怎么实现。谢谢各位!帮忙看看。

代码如下:
<TABLE height=149 cellSpacing=0 cellPadding=0
width=237 border=0>
<TBODY>
<TR>
<TD width=237 height=39> </TD></TR>
<TR>
<TD style="PADDING-LEFT: 26px" vAlign=top
height=110><TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
border=0>
<%sql="select * from Xy_Gt order by gtid Desc"
rs.open sql,conn,1,1
if rs.recordcount=0 then
response.write" 暂时还没有信息..."
else

while not rs.eof
%>
<tr>


</tr>
<tr>
<td width="90%"> <marquee id=scrollArea direction="up" scrolldelay="100"scrollamount="1" width="100%" height="10"onmouseover=scrollArea.stop() onmouseout=scrollArea.start()><a href="ggInfo.asp?Id=<%=rs("gtId")%>#"><%=left(rs("gtcon"),15)%></a></marquee></td>
<td width="10%"></td>
</tr>
<%
rs.movenext
wend
end if
rs.close%>
</TABLE></TD></TR></TBODY></TABLE>
...全文
63 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
sy_binbin 2008-11-18
  • 打赏
  • 举报
回复
http://www.popub.net/script/MSClass.html

自己去研究吧
liveingo 2008-11-18
  • 打赏
  • 举报
回复
谁来帮我看看啊。好苦闷!
liveingo 2008-11-18
  • 打赏
  • 举报
回复
试了一下。还是不行。
aigoo 2008-11-18
  • 打赏
  • 举报
回复
滚动代码有问题
换下这个
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无缝滚动</title>
<style type="text/css">
img{
border:0;
height:100px; width:150px;
}
td img{
margin:0 10px;
}
</style>
</head>
<body>
<!-- 纵向向无缝滚动-->
<div id="demo" style="overflow:hidden;height:350px;width:200px">
<div id="demo1">
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_01.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_02.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_03.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_04.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_05.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_06.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_07.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_08.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_10.jpg"></a><p>
<a href="#" target="_blank"><img src="jsfile/imagesa32/gundong_11.jpg"></a><p>
</div>
<div id="demo2">
</div>
</div>
<script>
var speed=40;
var demo2=document.getElementById("demo2");
var demo1=document.getElementById("demo1");
var demo=document.getElementById("demo");
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight;
else{
demo.scrollTop++;
}
}
var MyMar=setInterval(Marquee,speed);
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>


<!-- 横向无缝滚动-->
<div style="margin-top:20px;">
<div id="scroll_div" style="overflow: hidden; WIDTH: 778px;" align=center>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="scroll_begin">
<a href="#"><img src="jsfile/imagesa32/gundong_11.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_01.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_02.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_03.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_04.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_05.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_06.jpg" border=0></a><a href="#"><img src="jsfile/imagesa32/gundong_07.jpg" border=0></a></td>
<td id="scroll_end"></td>
</tr>
</table>
</div></div>
<script>
var speed1=40
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee1(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else{
scroll_div.scrollLeft++
}
}
var MyMar1=setInterval(Marquee1,speed1)
scroll_div.onmouseover=function() {clearInterval(MyMar1)}
scroll_div.onmouseout=function() {MyMar1=setInterval(Marquee1,speed1)}
</script>

</body>
</html>
liveingo 2008-11-18
  • 打赏
  • 举报
回复
现在的情况是它把15条记录作为一个整体来滚动了。怎么样让他们分开滚动,一条滚完接着一条。
redcn2004 2008-11-18
  • 打赏
  • 举报
回复
<tr>


</tr>

这个去掉
yjy84317 2008-11-18
  • 打赏
  • 举报
回复
<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>
</head>
<body>
<div id="infozone">
<div><a href="http://www.92mk.com" target="_blank">名客网</a></div>
<div><a href="http://http://liujianfeng.92mk.com" target="_blank">名客小筑</a></div>
<div><a href="http://www.92mk.com" target="_blank">名客网</a></div>
<div><a href="http://http://liujianfeng.92mk.com" target="_blank">名客小筑</a></div>
</div>
yjy84317 2008-11-18
  • 打赏
  • 举报
回复
<marquee direction="up" width=235 height=90 scrollamount="3" onMouseOver="this.scrollDelay=500" onMouseOut="this.scrollDelay=1">要滚动的文字</marquee>

<MARQUEE scrollAmount=2 scrollDelay=50 direction=up width=200 height=200 behavior=scroll>要滚动的文字</MARQUEE>
最简单的滚动代码。

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧