1. Register a namespace
Type. registernamespace ("Wallis ");
Is to add Wallis to the window, and then the namespace can be directly used anywhere (the window is global and can be omitted during use)
2. Registration
Wallis. Animal. registerclass ("Wallis. Animal ");
You can find
Type. Prototype. registerclass = function type $ registerclass (typename, basetype, interfacetypes)
Here, type points to a funtion object Wallis. animal, this object has a prototype method registerclass when it is created, which means ASP. net Ajax client framework maintains an internal object that contains all classes registered to the framework. This allows the user to execute the class reflection query during the runtime, which is similar to the class reflection query in. net. This also means that each class registered to the ASP. NET Ajax client framework retains its corresponding metadata information, such as the type name, in the internal domain such as _ typename. Therefore, you can execute runtime object reflection.
Javascript alone does not need to be registered, but some Ajax mechanisms cannot be used.