• arguments 属性(函数)(JavaScript)


    转载:http://msdn.microsoft.com/zh-cn/library/he95z461(v=vs.94).aspx

    获取当前正在执行的 Function 对象的参数。

    function.arguments

    备注

    function 参数是当前正在执行的函数的名称,且可以省略。

    此属性使函数可以处理可变数量的参数。 arguments 对象的 length 属性包含了传递给函数的参数数目。 arguments 对象中包含的各个参数的访问方式与数组元素的访问方式相同。

    示例

    下面的示例阐释了 arguments 属性的用法:

     1 function ArgTest(arg1, arg2){
     2    var s = "";
     3    s += "The individual arguments are: "
     4    for (n = 0; n < arguments.length; n++){
     5       s += ArgTest.arguments[n];
     6       s += " ";
     7    }
     8    return(s);
     9 }
    10 console.log(ArgTest(1, 2, "hello"));
    11 // The individual arguments are: 1 2 hello

    要求

    在以下文档模式中受支持:Quirks、Internet Explorer 6 标准模式、Internet Explorer 7 标准模式、Internet Explorer 8 标准模式、Internet Explorer 9 标准模式、Internet Explorer 10 标准模式和 Internet Explorer 11 标准模式。此外,也在应用商店应用(Windows 8 和 Windows Phone 8.1)中受支持。

  • 相关阅读:
    自定义控件-控件关联
    DELPHI INSERT INTO 语句的语法错误 解决方法
    Delphi控件开发
    Delphi控件复合控件
    vcl学习备忘网址
    Delphi单元文件Unit详解
    aowner , nil 和 self 的区别
    Delphi 自定义事件的例子
    PHP中Heredoc
    What is HTTP_USER_AGENT?
  • 原文地址:https://www.cnblogs.com/johnnylion/p/3937477.html
Copyright © 2020-2023  润新知