Reprint: http://msdn.microsoft.com/zh-cn/library/he95z461 (v=vs.94). aspx
Gets The parameters of the currently executing Function object.
function. Arguments
Note
The function parameter is the name of the functions currently executing and can be omitted.
This property enables a function to handle a variable number of arguments. The length property of the arguments object contains the number of arguments passed to the function. each parameter contained in the arguments object is accessed in the same way as the array element.
Example
The following example illustrates the use of the arguments property:
1 functionargtest (arg1, arg2) {2 vars = "";3s + = "The individual arguments is:"4 for(n = 0; n < arguments.length; n++){5s + =Argtest.arguments[n];6s + = "";7 }8 return(s);9 }TenConsole.log (Argtest (1, 2, "Hello")); One //The individual arguments are:1 2 Hello
Requirements
Supported in the following document modes: Quirks, Internet Explorer 6 standard mode, Internet Explorer 7 Standard mode, Internet Explorer 8 standard mode, Internet Explorer 9 standard mode, INT Ernet Explorer 10 Standard mode and Internet Explorer 11 standard mode. In addition, it is also supported in store apps (Windows 8 and Windows Phone 8.1).
Arguments Property (function) (JavaScript)