Internet Explorer表示Object不支持此属性或方法 [英] Internet explorer says Object doesn't support this property or method

查看:116
本文介绍了Internet Explorer表示Object不支持此属性或方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这行是79:

window.addEvent('domready', function(){     
    mySlide = new Fx.Slide('advert');
    mySlide.hide();
});

它也不喜欢这一行:

this.wrapper = new Element('div',
                           {
                              'styles': $extend(
                                                this.element.getStyles('margin'), 
                                                {'overflow': ''}
                                               )
                           })
                .injectAfter(this.element)
                .adopt(this.element);

有谁知道为什么会发生这种情况?有谁知道如何解决这个问题?我正在使用jQuery和Mootools ..并想要一个解决方案。

Does anyone know why this happens? Does anyone know how to fix this? I am using jQuery and Mootools.. and wanted a solution.

推荐答案

如果你在这个页面上登陆,同时拼命搜索为什么你在IE中有这个错误,请允许我指出另一种可能发生的方式。希望我发表的这个简单的行为会帮助我记住这一点,否则这个问题会在下次遇到这个错误的时候出现在google里面。这似乎至少每2年发生一次。

In case you are landing on this page while desperately searching for why you have this error in IE, allow me to point out another way this can happen. Hopefully, either the mere act of me posting this will help me remember this, or this question will show up in google the next time I run into this error. It seems to happen at least every 2 years.

如果你已经命名一个变量(不知道如果它是全局的,我的这个时候) )与元素的ID相同。例如:

This can show up if you've named a variable (Not sure if it has to be global, mine was this time) the same thing as an element's ID. For instance:

<div id="foo">
</div>
<script type="text/javascript">
    var foo = 1; < --Object doesn 't support this property or method!!
</script>

这篇关于Internet Explorer表示Object不支持此属性或方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆