function search(){ // 以下两句是等效的 console.log(search.caller.name); // 警告:在严格模式下,第5版 ECMAScript (ES5) 禁止使用 arguments.callee() console.log(arguments.callee.caller.name) } function baidu(){ search(); } function google(){ search(); } google(); baidu();