📅  最后修改于: 2022-03-11 15:01:29.245000             🧑  作者: Mango
function alertTheCallersName(){
var callingFunctionName=alertTheCallersName.caller.name; //get the callers name here
alert(callingFunctionName);
}
function someOtherFunction(){
alertTheCallersName();
}
someOtherFunction();