js 中caller的意思,这段代码看不懂,帮看看 财富值97

2016-10-21 19:18发布

1498 3 4
//主接口 win.laydate = function(options){     options = options || {};     try{         as.event = win.event ? win.event : laydate.caller.arguments[0];     } catch(e){};     Dates.run(options);     return laydate; }; 

这个laydate.caller.arguments[0]啥意思?

友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
3条回答

If the function f was invoked by the top level code, the value of f.caller is null, otherwise its the function that called f.
这东西好像不建议使用。

75人赞 举报

直接写 函数名(laydate)不优雅,后期函数改名后都要改,可以用callee,最终实现的效果都是一样的。

48人赞 举报

调用 laydate 函数的函数的第一个参数。

25人赞 举报

一周热门 更多>