zoukankan      html  css  js  c++  java
  • 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)中受支持。

  • 相关阅读:
    11-8 Eureka Server整合SpringSecurity解决安全问题
    11-7 Eureka Server安全问题介绍
    11-6 CORS跨域资源共享解决
    11-5 JWT验证演示
    11-4 JWT验证开发演示
    11-3 JWT颁发流程讲解
    11-2 JWT介绍
    11-1 服务安全章节介绍
    10-15 Zuul知识点梳理
    10-14 Zuul与Meetingfilm整合
  • 原文地址:https://www.cnblogs.com/johnnylion/p/3937477.html
Copyright © 2011-2022 走看看