`
wangzi6hao
  • 浏览: 210208 次
  • 性别: Icon_minigender_1
  • 来自: sdf
社区版块
存档分类
最新评论

[Exception... "Not enough arguments [nsIDOMHTMLSelectElement.add]"

 
阅读更多

[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错误

opt=document.createElement("OPTION");
            opt.value=subArray[1];
            opt.text=subArray[2];
            document.getElementById("xxx").add(opt);

 这样写不符合w3c标准。
所以document.getElementById("xxx").options.add(opt);
这样写,就正常了。

分享到:
评论

相关推荐

    解析 this.initialize.apply(this, arguments)

    标题 "解析 this.initialize.apply(this, arguments)" 涉及到的是JavaScript编程中的一个关键概念,尤其是在对象构造和类继承的情景下。`this` 关键字在JavaScript中扮演着核心角色,它指的是函数调用时的上下文,而...

    arguments:永远不要写“Array.prototype.slice.call(arguments);” 以后再!

    这是基于但使用Object.defineProperty(arguments.constructor.prototype, [functionName], {enumerable: false, configurable: true, value: [functionBody]})代替,以避免迭代时出现混乱。 Object....

    Thinking in Java 4th Edition

    Exception handling: dealing with errors ............... 31 Concurrent programming ... 32 Java and the Internet .......... 33 What is the Web? ......................... 33 Client-side programming ........

    Addison.Wesley.C++.by.Dissection.2002.pdf

    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 ...

    request.setAttribute 语句前总显示红色感叹号解决办法 HTTP Status 500 -

    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....

    EurekaLog_7.5.0.0_Enterprise

    8)....Added: Exception line highlighting in disassember view in EurekaLog exception dialog and Viewer 9)....Added: Detection/logging Delphi objects in disassembly view 10)..Added: Support for multi-...

    Springer.The.Developer’s.Guide.to.Debugging.2008.pdf

    9.3.1 Missing Linker Arguments . . . . . . . . 111 9.3.2 Searching for Missing Symbols . . . . . . . . 112 9.3.3 Linking Order Issues . . . . . . . . . . 113 9.3.4 C++ Symbols and Name Mangling . . . ...

    android中遇到ERROR: Could not find method clean() for arguments这个奇葩的错误如何解决!!

    Could not find method clean() for arguments [{type=class org.gradle.api.tasks.Delete}, build_458py9op120bi768cfxm5xc2wrunclosure1_run_closure1r​unc​losure1_closure4@7daf132f] on object of type org....

    C++ 标准 ISO 14882-2011

    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 ...

    django报错:add_atr() takes 0 positional arguments but 1 was given

    add_atr() takes 0 positional arguments but 1 was given Request Method: GET Request URL: http://127.0.0.1:8000/add_stu/ Django Version: 3.0.3 Exception Type: TypeError Exception Value: add_atr() takes ...

    Unable to build: the file dx.jar was not loaded from the SDK folder!

    Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder! 问题的缺失文件 eclipse.buildId=M20100211-1343 java.version=1.6.0_10-rc2 java.vendor=Sun Microsystems Inc. ...

    Array.prototype.slice.apply的使用方法

    代码如下: function test(){ //将参数转为一个数组 var args = Array.prototype.slice.apply(arguments); alert&#40;args&#41;; } arguments在JavaScript语法中... 所以,直接调用arguments.slice()将返回一个”Ob

    JDT生成代码实例

    superConstructorInvocation.arguments().add(ast.newNullLiteral()); } /**//*定义一个方法,形如: public String getString(String name){ String newString = name + "你好"; return newString; } */ ...

    【jmeter】源码

    【Jmeter】Jmeter:插件二次开发——源码导入eclipse,查看我的另一博文: https://blog.csdn.net/qq_39720249/article/details/88644046

    arguments对象的使用

    1. **length属性**:`arguments.length`返回函数被调用时传入的参数个数,这与函数定义中的形参数量可能不同。 2. **索引访问**:可以通过索引来访问`arguments`对象中的参数,就像访问数组一样。例如,`arguments...

    Arguments是进行函数调用.doc

    例如,你可以检查`arguments.length`来确定传入的参数数量,进而执行相应的处理。 下面是一个简单的例子,展示了如何利用`Arguments`对象实现函数重载: ```javascript function example(a, b) { var numArgs = ...

    Notepad++ 6.5.5

    Notepad++ v6.5.5 new features and bug fixes: Add character encoding auto-detection feature. Fix the word-completion hanging problem by typing ... Add "Command line arguments help" menu item command.

    Thinking in JAVA 4th英文版

    Exception handling: dealing with errors ............... 31 Concurrent programming ... 32 Java and the Internet .......... 33 What is the Web? ......................... 33 Client-side programming ........

    tkinter.pdf

    7.5. CanvastagOrId arguments......................................................................................21 7.6. Methods on Canvas widgets........................................................

Global site tag (gtag.js) - Google Analytics