阅读背景:

如何在javascript中使用活动对象创建和部分拆解管理?

来源:互联网 

What I would like to do is load javascript to create a library of methods in an object and wait until the object is used for the first time before it is actually defined or compiled. I would like to build references to this object before it is actually fully defined. When I call a method on this object for the first time before the methods on the object are ever defined (meaning the object doesn't actually have methods) I would like to define the object and then call the method. Is there a way to do this using standard syntax such as "MyLibrary.sayHello()" if "sayHello()" is not yet defined on the object. I imagine it would look like this:What I would like to do is load javascript to c




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: