国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > JS > 正文

JavaScript的Function詳細

2024-09-06 12:44:28
字體:
來源:轉載
供稿:網友
Function (Built-in Object)
Function (內置對象)
Function is the object from which JavaScript functions are derived. Functions are first-class data types in JavaScript, so they may be assigned to variables and passed to functions as you would any other piece of data. Functions are, of course, reference types.

The Function object provides both static properties like length and properties that convey useful information during the execution of the function, for example, the arguments[] array.

Constructor
var instanceName = new Function([arg1 [, arg2 [, ...]] ,] body); 

The body parameter is a string containing the text that makes up the body of the function. The optional argN's are the names of the formal parameters the function accepts. For example:

var myAdd = new Function("x", "y", "return x + y");
var sum = myAdd(17, 34);

Properties

arguments[] An implicitly filled and implicitly available (directly usable as "arguments" from within the function) array of parameters that were passed to the function. This value is null if the function is not currently executing. (IE4+ (JScript 2.0+), MOZ, N3+ (JavaScript 1.1+), ECMA Edition 1)

arguments.callee Reference to the current function. This property is deprecated. (N4+, MOZ, IE5.5+)

arguments.caller Reference to the function that invoked the current function. This property is deprecated. (N3, IE4+)

arguments.length The number of arguments that were passed to the function. (IE4+ (JScript 2.0+), MOZ, N3+ (JavaScript 1.1+), ECMA Edition 1)

arity Numeric value indicating how many arguments the function expects. This property is deprecated. (N4+, MOZ)

caller Reference to the function that invoked the current function or null if called from the global context. (IE4+ (JScript 2.0+), MOZ, N3+)
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鲁甸县| 阳城县| 聂拉木县| 策勒县| 城固县| 循化| 长垣县| 马尔康县| 黄平县| 剑河县| 称多县| 铁岭县| 西乌珠穆沁旗| 开化县| 柳河县| 宁武县| 石台县| 新河县| 乐安县| 迁安市| 清丰县| 裕民县| 巫溪县| 监利县| 张家界市| 宜黄县| 浦北县| 闻喜县| 阜新市| 鲁甸县| 古蔺县| 会同县| 尚义县| 靖江市| 河西区| 富锦市| 左云县| 玉林市| 庆云县| 会东县| 清水河县|