caller
注意: es5 模式不能使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>caller</title>
</head>
<body>
</body>
<script>
// caller
// es5 模式不能使用
// "use strict";
function demo() {
test()
}
function test() {
console.log(test.caller);
}
demo();
</script>
</html>