当我在任何版本的 IE 中查看我正在使用的站点时,我都会收到错误消息,并且唯一似乎加载的是背景。真的不确定如何解决这个问题,我什至不确定错误的含义。
错误是第 117 行的无效参数。
它在 Firefox、Safari 和 Chrome 中运行良好。
最佳答案
117 指向 jQuery 文件。 调试代码错误出现在if(e)f[b]=d;
- b 是“宽度”
- d 是“NaNem”
回到 CallStack,您在这里调用 jQuery 方法
supersubs.js 中的第 63 行:
$ul.css('width',emWidth);
查找几行,您会看到有关 clientWidth 的注释,这可能是麻烦开始的地方。 :)
var emWidth = $ul.add($LIs).add($As).css({
'float' : 'none',
'width' : 'auto'
})
// this ul will now be shrink-wrapped to longest li due to position:absolute
// so save its width as ems. Clientwidth is 2 times faster than .width() - thanks Dan Switzer
.end().end()[0].clientWidth / fontsize;
// add more width to ensure lines don't turn over at certain sizes in various browsers
所以再看一下 ...end()[0].clientWidth 行返回 0 和 fontsize = 0 所以你有 0/0 这是 NaN
关于javascript - Internet Explorer 中的无效参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3443272/