khả năng hiển thị màu xanh lá cây bên trong lớp được tự động thiết lập kế thừa các khả năng hiển thị của lớp bên ngoài của nó có chứa. Khi bạn kích vào các nút lớp bên ngoài, lớp bên trong một cách mù quáng theo các thiết lập. | Chapter 41 Functions and Custom Objects 1059 automatically stored in a function object as the caller property. This relationship reminds me a bit of a subwindow s opener property which points to the window or frame responsible for the subwindow s creation. The value is valid only while the called function is running at the request of another function when a function isn t running its caller property is null. The value of the caller property is a reference to a function object so you can inspect its arguments and caller properties in case it was called by yet another function . Thus a function can look back at a calling function to see what values it was passed. The functionName .caller property reveals the contents of an entire function definition if the current function was called from another function including an event handler . If the call for a function comes from a regular JavaScript statement not originating from inside a function the functionName .caller property is null. To help you grasp all that these two properties yield study Listing 41-1. Listing 41-1 A Function s arguments and caller Properties HTML HEAD SCRIPT LANGUAGE JavaScript function hansel x y var args P is BR is BR for var i 0 i i argument i is args i BR P function gretel x y z today new Date thisYear hansel x y z thisYear SCRIPT HEAD BODY SCRIPT LANGUAGE JavaScript hansel 1 two 3 gretel 4 five 6 seven SCRIPT BODY HTML 1060 Part IV JavaScript Core Language Reference When you load this page the following results appear in the browser window although the caller property values show undefined for NN6 is null is 3 argument 0 is 1 argument 1 is two argument 2 is 3 is function gretel x y z today new Date thisYear hansel x y z .