Ext.getCmp('base_form').getForm().on({
actioncomplete: function(form, action) {
if (action.type === 'load') {
if (action.result.success) {
//绑定开始时间
var date = new Date(action.result.data.regTime);
var edate = new Date(action.result.data.updateTime);
form.setValues({
regTime: Ext.Date.format(date,"Y-m-d"),
updateTime: Ext.Date.format(edate,"Y-m-d")
});
}
}
}
});
function Base() {
}
// Sub1 inherited from Base through prototype chain
function Sub1() {
}
Sub1.prototype = new Base();
Sub1.prototype.constructor = Sub1;
Sub1.superclass = Base.prototype;
// Sub2 inherited from Sub1 through prototype chain
function Sub2() {
}
Sub2.prototype = new Sub1();
Sub2.prototype.constructor = Sub2;
Sub2.superclass = Sub1.prototype;
// Test prototype chain
alert(Sub2.prototype.constructor);
// function Sub2(){}
alert(Sub2.superclass.constructor);
// function Sub1(){}
alert(Sub2.superclass.constructor.superclass.constructor);
// function Base(){}