gpt4 book ai didi

javascript - 为什么 IE 中的 Magento js/varien/form.js 错误 - js fiddle

转载 作者:行者123 更新时间:2023-11-29 09:56:44 25 4
gpt4 key购买 nike

这似乎是很多人都遇到过的问题! Link to google search results

有很多答案,我研究了一些比较合理的答案,并修复了页面上的所有 javascript 错误。在 Chrome 中,我没有发现任何错误,但在 IE8 中,我在第 205 行错误中收到无效参数,并且状态下拉列表丢失。我不是 JavaScript 专家,不知道从哪里开始解决这个问题。尤其是涉及浏览器细节时。

Screenshot of problem

如果您查看 JS 中的第 205 行,缺少的字段包括:

if (this.regionSelectEl.options.add) {
this.regionSelectEl.options.add(option);
} else {
this.regionSelectEl.appendChild(option);
}

恰好是页面中缺少的区域(州)选择元素。JS的链接: http://jsfiddle.net/bms85/LKdsq/1/

这可能是什么原因造成的?

编辑:

我发现原因是与精简的最新版本的 modernizer 发生冲突,我正在为 html5 polyfill 使用 modernizer。仍在尝试调试冲突。

最佳答案

我在使用 Magento/Modernizr 网站时也遇到过这个问题,Brendan Falkowlski's answer给我指出了一个解决方案。由于他的回答,Modernizr has released 2.6.x它将 html5shiv 更新到 3.6,其中包括针对特定问题的修复。因此,如果您遇到此问题并使用 2.6 之前的 modernizr,更新到最新版本(使用其捆绑的 html5shiv)应该可以解决问题。

关于javascript - 为什么 IE 中的 Magento js/varien/form.js 错误 - js fiddle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10303770/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com