我的 JS 文件中有这一行
while(this.c.offsetWidth > this.w - s && --exit){
w = isNaN(this.cw[0])? this.w - s : --this.cw[0];
if(w < 1 || this.w < Math.max(1, s)){break;}
this.c.style.width = isNaN(this.cw[0])? this.w - s + 'px' : --this.cw[0] + this.cw[1];
}
IE 不断告诉我无效参数代码:0
但它在其他浏览器上运行良好(正如 IE 所期望的那样)
最佳答案
我的猜测是问题出在这一行:
this.c.style.width =
isNaN(this.cw[0]) ? this.w - s + 'px' : --this.cw[0] + this.cw[1];
如果您仔细考虑 this.c.style.width
设置的内容,您会发现它将设置为不同的结果。确切地说,在前者中您使用 'px'
但在后者中则不使用。显然,其中一个是正确的,另一个是错误的......
Here is another example结尾字符是问题所在。
关于javascript - 如何修复 Internet Explorer 8 中的 `Internet Argument Code: 0`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9749112/