我使用diapo滑块,似乎是在所有其他浏览器的工作除了Internet Explorer 8中IE 8:对象不支持属性或方法“getElementsByClassName方法”
在调试模式下,我得到运行IE8后以下错误:
SCRIPT438: Object doesn't support property or method 'getElementsByClassName' prototype.js, line 5988 character 5
return function(className, parentElement) {
return $(parentElement || document.body).getElementsByClassName(className);
};
SCRIPT438: Object doesn't support property or method 'fireEvent' prototype.js, line 5736 character 7
if (document.createEvent)
element.dispatchEvent(event);
else
element.fireEvent(event.eventType, event);
return Event.extend(event);
我运行这个滑块Magento的平台,似乎原型SCR ipt在有问题的那个。它使用的原型版本是1.7,因此排除了脚本更新的可能修复。
注意:虽然,我不是在IE9中具有显示器的问题,我收到以下错误:
SCRIPT438: Object doesn't support property or method 'dispatchEvent' prototype.js, line 5734 character 7
if (document.createEvent)
element.dispatchEvent(event);
else
element.fireEvent(event.eventType, event);
return Event.extend(event);
这些都是必需的diapo滑块工作的脚本,在标题中加载脚本标记。我不知道,但也许其中某些脚本与现有脚本发生冲突:
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/scripts/jquery.min.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/jquery.mobile-1.0rc2.customized.min.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/jquery.hoverIntent.minified.js'></script>
<script type='text/javascript' src='http://www.pixedelic.com/plugins/diapo/scripts/diapo.js'></script>
感谢罗布,但我将如何应用此修复...我更新我的帖子有关使用脚本的更多相关细节?请让我知道这可不可以帮你。非常感谢! – gdinari
您在同一页面上使用jQuery和Prototype.js。有没有机会与对方发生冲突? Diapo不使用Prototype.js,但仍然遇到与Prototype.js相关的错误。 –
是的,原型脚本是magento平台的一部分,所以默认上传它...我可以尝试禁用它只为主页,但我也有兴趣在您的polyfill解决方案 – gdinari