javascript - Internet Explorer 中的无效参数

标签 javascript internet-explorer

当我在任何版本的 IE 中查看我正在使用的站点时,我都会收到错误消息,并且唯一似乎加载的是背景。真的不确定如何解决这个问题,我什至不确定错误的含义。

错误是第 117 行的无效参数。

它在 Firefox、Safari 和 Chrome 中运行良好。

这是网址:http://streamlinehome.com/wordpress/

最佳答案

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/

相关文章:

javascript - 在 HTML5 Canvas 中绘制箭头曲线

javascript - 如何在 highcharts 系列中使用 javascript 变量?

javascript - 三.js + Chrome 43 : Error creating WebGL context

javascript - 什么是 lambda 语言?

javascript - IE - IFRAMES/数据 URI

html - IE边框半径显示错误

internet-explorer - 使用 CSS 的 IE 8 的 3 列输出

javascript - Angular 中的嵌套动态形式 - 无法读取未定义的属性 'controls'

internet-explorer - 在任何低于 10 的 IE 版本上,AngularJS 拒绝 XMLHttpRequest 访问

silverlight - Internet Explorer 将不同的用户代理字符串发送到不同的站点