prototype1.4简介_yj
5.4.5 The Class object
在这个程序包中 Class 对象在声明其他的类时候被用到 。用这个对象声明类使得新类支持 initialize() 方法,他起构造方法的作用。 看下面的例子
//declaring the class
var MySampleClass = Class.create();
//defining the rest of the class implmentation MySampleClass.prototype = {
initialize: function(message) { this.message = message; },
showMessage: function(ajaxResponse) { alert(this.message); } };
//now, let's instantiate and use one object var myTalker = new MySampleClass('hi there.'); myTalker.showMessage(); //displays alert
5.4.6 The Ajax object
这个对象被用作其他提供AJAX功能的类的根对象。
5.4.7 The Ajax.Responders object 继承自 Enumerable
这个对象维持一个在Ajax相关事件发生时将被调用的对象的列表。比如,你要设置一个全局钩子来处理
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库prototype1.4简介_yj(18)在线全文阅读。
相关推荐: