参数无效。


Language Message Number
简体中文 参数无效。 -2147024809
无法得到 display 属性。 参数无效。 -2147024809
繁体中文 不正確的引數。
引數無效。
引數的個數錯誤或指定了不正確的屬性
英文 Invalid argument.
德文 Ungültiges Argument.
日文 引数が無効です。

分析

已知的可能情况有:

  1. 设置样式的值不合法,如:缺少单位、负值,需要数值时提供了 NaN 或空字符串等。

    elem.style.width = undefined + "px"; // 参数无效
    elem.style.width = NaN + "px"; // 参数无效
    elem.style.width = -1 + "px"; // 参数无效
    
    elem.style.width = "1px"; // 正确
  2. IE8 及其以下,都不支持 display:inherit

    elem.style.display = "inherit"; // 无法得到 display 属性。 参数无效。
Browser Language Message Number
IE 简体中文

案例

异常字段
Message Invalid argument.
URL https://cashier.alipay.com/standard/gateway/cartoonPay.htm
File https://a.alipayobjects.com/??...,static/ar/arale.dom-1.1.js,...
Line 348
},setStyle:function(styles){var match;if(arale.isString(styles)&&arguments.length==2){var tmp={};
tmp[arguments[0]]=arguments[1];styles=tmp}for(var property in styles){if(property=="opacity"){this.setOpacity(styles[property])
}else{if(property=="class"||property=="className"){this.className=new String(property)
}else{this.node.style[(property=="float"||property=="cssFloat")?(arale.isUndefined(this.node.style.styleFloat)?"cssFloat":"styleFloat"):property]=styles[property]
}}}return this},setOpacity:function(value){if(value>1||value<0){return this}if(arale.isIE()&&Number(arale.browser.ver())<9){this.node.style.filter="alpha(opacity="+value*100+")"
}this.node.style.opacity=(value<0.00001)?0:value;return this},getViewportSize:function(){return{width:$D.getViewportWidth(this.node),height:$D.getViewportHeight(this.node)}
},getDocumentSize:function(){return{width:$D.getDocumentWidth(this.node),height:$D.getDocumentHeight(this.node)}

相关异常

参考