一天了,难道真的没人能解决吗?

zzxl 2012-04-28 09:18:46
我在(http://download.csdn.net/detail/gmzyyzgh/3007916)下载的“新浪网图片展示幻灯片CSS代码”,
在IE6下运行时提示“载入错误!”,IE7下运行时无法显示。 能不能给指导一下。联系:263317143@qq.com,多谢!

...全文
257 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
zzxl 2012-04-28
  • 打赏
  • 举报
回复
this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();
我把这两句注释掉了,Ie6下可以正常了
zzxl 2012-04-28
  • 打赏
  • 举报
回复


....
if(sina.isIE){
this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Apply();
this.ImgObj1.lowsrc = this.filmstrips[num].lowsrc;
this.ImgObj1.src = this.filmstrips[num].src;
this.ImgObj1.filters[0].Play();
}
....
具体咋改?

this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();

豪情 2012-04-28
  • 打赏
  • 举报
回复
下一步先看看apply,play方法有错没,经检查没有错误,
紧跟着我们在google里边查查后发现ie6不支持filters,
错误终于浮出水面,
然后简单了,根据特性做判断:

if (this.ImgObj1.filters) {
this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();
}

但这样还是报错,那只能换个特性了,

if (window.XMLHttpRequest) {
this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();
}

致此,这个错误才得以解决。
虽然化了一个多小时,但帮助你的同时,也锻炼了我的耐性。双赢了~!
zzxl 2012-04-28
  • 打赏
  • 举报
回复
腾讯新闻用的跟这个超不多,在IE6下,不报错但,图片显示也是问题

http://news.qq.com/a/20120428/000201.htm#p=6
新浪
http://slide.sports.sina.com.cn/g/slide_2_730_26706.html

以上是新浪的页面,在IE6下不能正常显示

各位高人试一下就知道了
豪情 2012-04-28
  • 打赏
  • 举报
回复
遇到这种错误,考验人整体的技术储备之外还有就是耐心。
其实一步一步找还是很容易找到容易的。
1. 在html里边ctrl + f 查找 “载入错误”,很容易找到,177行,而177行上面是个try catch,那肯定是try里边报错,在try里边一步一步写alert(1);看那一行不报错,很容易找到:
epidiascope.initialize();//初始化
中出错了。
2. 检查:epidiascope.initialize();//初始化,
在initialize方法中,很容易找到 263行,this.select(0);报错。
3. 在this.select(0)中很容易找到:
320,324行注释后可运行:
就是这两句:
// this.ImgObj1.filters[0].Apply();
// this.ImgObj1.filters[0].Play();
看他的方法名,估计注释后不能播放了。
zzxl 2012-04-28
  • 打赏
  • 举报
回复
我是用Ietester测得
错误信息

Inernet Explorer Script Error

Line:239
Char:4
Error:找不到成员
Code:0

。。。。。
ycproc 2012-04-28
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 的回复:]

我是用Ietester测得
[/Quote]


你可以多测试几台电脑 用别的电脑测试
zzxl 2012-04-28
  • 打赏
  • 举报
回复
我是用Ietester测得
001007009 2012-04-28
  • 打赏
  • 举报
回复
看了下,在ie6、7、8 ff chrome 均没错,可以正常运行
liguoxing81 2012-04-28
  • 打赏
  • 举报
回复
顶5楼。
你可以用alert()看看到底是在哪一行出错了,然后再去改。还有很多是因为浏览器兼容问题。
zzxl 2012-04-28
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 的回复:]

this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();
我把这两句中间还有两句,直接去掉
[/Quote]
Acesidonu 2012-04-28
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 的回复:]
下一步先看看apply,play方法有错没,经检查没有错误,
紧跟着我们在google里边查查后发现ie6不支持filters,
错误终于浮出水面,
然后简单了,根据特性做判断:

JScript code


if (this.ImgObj1.filters) {
this.ImgObj1.filters[0].Apply();
this.ImgObj1.fi……
[/Quote]
++
非常不错
豪情 2012-04-28
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 zzxl 的回复:]

this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();
我把这两句注释掉了,Ie6下可以正常了
[/Quote]
if (window.XMLHttpRequest) {
this.ImgObj1.filters[0].Apply();
this.ImgObj1.filters[0].Play();
}

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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