急!怎么用JavaScript来处理滚动的图片,第一页与最后一页之间不能有空白的,必需连上!<在线等待>给分.. 用marquee也许行吧,不过我没做过,我觉得应该是不行才对。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把每一张图片都放到一个数组里,用for循环 <div id=demo style=overflow:hidden;height:132px onmouseover="ii=1" onmouseout="ii=0"> <div id=demo1> <TABLE width="98%" border=0 cellPadding=4 cellSpacing=0 align="center"> <TBODY> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=02042709','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">中国网通本地网资源管理高级研讨会成功举行<img src=/Huasun/docroot/images/new.gif border=0></a></TD> </TR> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=24080147','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">公司网站于2002年12月25日-31日试运行</a></TD> </TR> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=24113509','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">新一代网络资源管理系统面世<img src=/Huasun/docroot/images/new.gif border=0></a></TD> </TR> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=24114313','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">华胜鸣天GIStar系统通过部级鉴定<img src=/Huasun/docroot/images/new.gif border=0></a></TD> </TR> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=23102215','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">天津市通信公司本地网网络资源集中管理系统签订</a></TD> </TR> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=23102149','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">北京电信资源调度管理系统签订</a></TD> </TR> <TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''"> <TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=23102116','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">通过GB/T 19001-2000--ISO 9001:2000质量体系认证</a></TD> </TR> </TBODY> </TABLE> </div> <div id=demo2></div> <script>var ii=0;t=demo.scrollTopdemo2.innerHTML=demo1.innerHTMLfunction qswhMarquee(){if (ii==1)returnif(demo2.offsetTop-demo.scrollTop<=0)demo.scrollTop-=demo1.offsetHeightelsedemo.scrollTop++}setInterval(qswhMarquee,50)</script>----------------将以上代码放到<body></body>之间,应该是你想要的结果,呵呵~~查看http://www.cntomorrow.com主页的滚动新闻,就是这样的.:) 请问,Anchor对象和Link对象 请教一个数组操作问题 还是关于图片横向滚动的问题 给下拉框赋值的问题----出错了 [十万火急]DIV移动层右键问题 求一javascript正则表达式 100分 如何用javascript控制一个字段的长度为15或18个字符? 把对象赋给变量的问题。。望高手解答 各位大侠帮帮忙——————我想实现在同一页的基础上生成一些表单组件 如此情况,怎样引用变量?我想申明一个全局变量在别处引用,怎么办? 怎么判断一个窗口是否已经打开? 150分求解!如何在客户端对文件进行操作?
<div id=demo1>
<TABLE width="98%" border=0 cellPadding=4 cellSpacing=0 align="center">
<TBODY>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=02042709','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">中国网通本地网资源管理高级研讨会成功举行<img src=/Huasun/docroot/images/new.gif border=0></a></TD>
</TR>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=24080147','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">公司网站于2002年12月25日-31日试运行</a></TD>
</TR>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=24113509','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">新一代网络资源管理系统面世<img src=/Huasun/docroot/images/new.gif border=0></a></TD>
</TR>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=24114313','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">华胜鸣天GIStar系统通过部级鉴定<img src=/Huasun/docroot/images/new.gif border=0></a></TD>
</TR>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=23102215','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">天津市通信公司本地网网络资源集中管理系统签订</a></TD>
</TR>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=23102149','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">北京电信资源调度管理系统签订</a></TD>
</TR>
<TR onmouseover="this.style.backgroundColor='#f7f7f7'" onmouseout="this.style.backgroundColor=''">
<TD>·<a href="#" onClick="window.open('/Huasun/docroot/news/news.jsp?ID=23102116','','toolbar=0,menubar=0,scrollbars=1,resizable=1,status=0,location=0,directories=0,copyhistory=0,height=400,width=550,top=10,left=10')">通过GB/T 19001-2000--ISO 9001:2000质量体系认证</a></TD>
</TR>
</TBODY>
</TABLE>
</div>
<div id=demo2></div>
<script>
var ii=0;t=demo.scrollTop
demo2.innerHTML=demo1.innerHTML
function qswhMarquee(){
if (ii==1)return
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else
demo.scrollTop++
}
setInterval(qswhMarquee,50)
</script>----------------
将以上代码放到<body></body>之间,应该是你想要的结果,呵呵~~
查看http://www.cntomorrow.com主页的滚动新闻,就是这样的.:)