Ext.namespace("Ext.wentao"); // 自定义一个命名空间
Ext.wentao.Person = Ext.emptyFn; // 在命名空间上自定义一个类
// 演示类实例方法
Ext.apply(Ext.wentao.Person.prototype, {
name : "刘文涛",
sex : "男",
print : function() {
alert(String.format("姓名:{0},性别:{1}", this.name, this.sex));
}
});
alert(String.format("姓名:{0},性别:{1}", this.name, this.sex));
类似占位符 这好像不是JS中的写法吧 自己测试过没有此类方法调用