图片滚动的问题

[复制链接]
一个奇怪的问题,如果该图片滚动的js代码不在table中,那么滚动正常,如果在table中,那么就会自动停止滚动,请问该如何解决,该图片滚动js代码如下:

<!--
var ScrollObj = function(scrollBodyId,scrollBoxId,showHeight,showWidth,lineHeight,stopTime,speed) {
this.obj = document.getElementById(scrollBodyId);
this.box = document.getElementById(scrollBoxId);

this.style = this.obj.style;
this.defaultHeight = this.obj.offsetHeight;

this.obj.innerHTML += this.obj.innerHTML;
this.obj.style.position = \"relative\";

this.box.style.height = showHeight;
this.box.style.width = showWidth;
this.box.style.overflow = \"hidden\";

this.scrollUp = doScrollUp;
this.stopScroll = false;

this.curLineHeight = 0;
this.lineHeight = lineHeight;
this.curStopTime = 0;
this.stopTime = stopTime;
this.speed = speed;
this.style.top = lineHeight;
this.object = scrollBodyId + \"Object\";
eval(this.object + \"=this\");
setInterval(this.object+\".scrollUp()\",speed);
this.obj.onmouseover=new Function(this.object+\".stopScroll=true\");
this.obj.onmouseout=new Function(this.object+\".stopScroll=false\");
}
function doScrollUp(){
if( this.stopScroll == true )
  return;
   this.curLineHeight += 1;
   if( this.curLineHeight >= this.lineHeight ){
    this.curStopTime += 1;
    if( this.curStopTime >= this.stopTime ){
     this.curLineHeight = 0;
     this.curStopTime = 0;
    }
   }
else{   
    this.style.top = parseInt(this.style.top) - 1;
    if( -parseInt(this.style.top) >= this.defaultHeight ){
      this.style.top = 0;
    }
   }
}
document.write(\'<div id=\"scroollBox487\" >\');
document.write(\'<div id=\"scroollBody487\">\');
document.write(\'<div><a href=\"http://www.souho.net\" target=\"_blank\"><img src=\"/images/1.gif\"></a></div>\');
document.write(\'<div><a href=\"http://www.souho.net\" target=\"_blank\"><img src=\"/images/2.gif\"></a></div>\');
document.write(\'<div><a href=\"http://www.souho.net\" target=\"_blank\"><img src=\"/images/3.gif\"></a></div>\');
document.write(\'</div></div>\');
var sample487 = new ScrollObj(\"scroollBody487\",\"scroollBox487\",500,200,20,50,50);
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏
收藏0
本帖违规,我要举报
举报本帖
免责声明:
本站资源均来源于网络或是会员上传,版权和著作权归原作者所有,如有不愿意被转载,请点击这里通知我们第一时间删除!
所有资源仅供下载后在本地学习研究参考使用!您必须在下载资源后的24个小时之内,从您的电脑中彻底删除。
所有资源不能用于任何商业和非法目的,否则一切后果请用户自负。如您需要商用,请支持和购买正版,本站不对您的使用负任何责任!
会员所发布的信息中如有涉及到具体的第三方个人(单位/公司)隐私、商业秘密等,侵犯其权益,对其构成不良影响的,本站有权不做通知直接删除!

精彩评论4

跳转到指定楼层
#沙发
 楼主| 一般 发表于 2008-6-22 01:43:43 | 只看该作者
已经用了<script language="javascript" src="/js/1.js"></script>这种方法调用
#板凳
91bysd 发表于 2008-6-22 05:30:45 | 只看该作者
8 8 8 我也搞不懂额.`....
#地板
91bysd 发表于 2008-6-22 05:39:08 | 只看该作者
8 1 2
#地窖
 楼主| 一般 发表于 2008-6-22 15:19:06 | 只看该作者
百迈呢,快来快来!!!
您需要登录后才可以回帖 登录 | 注册帐号

本版积分规则

关注0

粉丝3

帖子0

发布主题
15年专注源码提供
侵权投诉处理

点击这里投诉侵权

周一至周日10:00-21:00

反馈建议/违规信息举报

webmaster@souho.net 在线客服咨询

扫描二维码关注我们

严禁任何人以任何形式在本站发表与我国法律相抵触的言论!本站资源仅供本地学习研究,禁止用于任何违法犯罪活动!

搜虎源码所有资源来自网络收集整理,版权和著作权归原作者所有,仅供本地研究学习。若有侵权,请联系管理员及时删除!

所有资源严禁用于任何商业目的,否则一切后果请用户自负。如您需要商用,请支持和购买正版,本站不对您的使用负任何责任!

如会员所发布的信息中有涉及到具体的第三方个人(单位/公司)隐私、商业秘密等,侵犯其权益,对其构成不良影响的,本站有权不做通知将该信息予以直接删除处理!

网站备案号: 鄂ICP备17009394号-2