js动态设置方法
In essence, privileged methods are dynamically generated methods, because they’re added
to the object at runtime, rather than when the code is first compiled. While this technique is
computationally more expensive than binding a simple method to the object prototype, it is
also much more powerful and flexible. Listing 2-25 is an example of what can be accomplished
using dynamically generated methods.
1 楼 robin_leung 2011-03-22 不错的方法