Exception... "Not enough arguments [nsIDOMHTMLSelectElement.add]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" lo+
关于select添加<option>元素时,出现[Exception... "Not enough arguments [nsIDOMHTMLSelectElement.add]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" lo错误
一般是select对象加option的时候抛出的错误。
这是由于写法document.getElementById(**).add(new Option(**,**));导致的。它不符合W3C dom标准写法。
解决办法:
1. document.getElementById(**).options.add(new Option(**,**));
2. document.getElementById(**).appendChild(new Option(**,**));
另, 用xmlHttprequest会有浏览器不兼容的问题, 建议用ajax代替。
分享到:
相关推荐
主要介绍了Javascript中arguments和arguments.callee的区别浅析,本文用一个实例来理解它们的区别,需要的朋友可以参考下
主要介绍了JavaScript arguments.callee作用及替换方案详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
arguments.callee的使用方法,具体大家自己测试了
Arguments and Results 参数,资源
Rethinking the design of the Internet:The end to end arguments vs. the brave new world 作者:Marjory S. Blumenthal, Computer Science & Telecommunications Bd David D. Clark, M.I.T. Lab for Computer ...
Exception handling: dealing with errors ............... 31 Concurrent programming ... 32 Java and the Internet .......... 33 What is the Web? ......................... 33 Client-side programming ........
主要介绍了Javascript函数中的arguments.callee用法,结合实例形式分析了arguments.callee操作当前方法引用的具体技巧,需要的朋友可以参考下
When to Use (or Not Use) an Interpreted Language .........................................8 Understanding Bytecodes .......................................................................................
TypeError: _queue_reduction(): incompatible function arguments. The following argument types are supported: 1. (process_group: torch.distributed.ProcessGroup, grads_batch: List[List[at::Tensor]], ...
21天学习SQL V1.0.pdf 66 SQL 21 日自学通(V1.0) 翻译人笨猪 ...日期/时间函数............................................................................................................ADD_MONTHS..................
Contents Contents ii List of Tables x List of Figures xiv 1 Scope 1 2 Normative references 2 3 Terms and definitions 3 4 General principles 7 4.1 Implementation compliance . ....4.2 Structure of this ...
主要介绍了Javascript中函数名.length属性用法,结合实例形式简单对比分析了与arguments.length属性的用法区别,需要的朋友可以参考下
3.9 Functions as Arguments....... 86 3.10 Overloading Functions........ . 88 3.11 Inlining.......... . 89 3.11.1Software Engineering: Avoiding Macros... 89 3.12 Scope and Storage Class....... 90 ...
The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, double) y2ssh.sg.chp1.action.AddAction.execute(AddAction.java:18) y2ssh.sg.chp1....
基本的粒子群算法工具箱,可尝试解决优化配置,目标函数求最值问题
安装使用以下命令从NuGet Gallery GUI或程序包管理器控制台进行安装: Install-Package Utility.CommandLine.Arguments 该代码还设计为作为单个源文件(Arguments.cs)合并到您的项目中。快速开始在包含Main()的类中...
Contents Contents iii List of Tables xi List of Figures xv 1 General 1 1.1 Scope . . . . ....1.2 Normative references ....1.3 Terms and definitions ....1.4 Implementation compliance ....1.5 Structure of this ...