类 Jx.Class


Defined in: jx.base.js.

类 概要
Constructor Attributes Constructor Name and Description
 
Jx.Class(option, object)
创建Class类的类 Class
类 详解
Jx.Class(option, object)
功能:
创建Class类的类 Class
Jx().$package(function(J){
    var Person = new J.Class({
     init : function(name){
         this.name = name;
         alert("init");
     },
     showName : function(){
         alert(this.name);
 
     }
 
 });
 
 // 继承Person
    var Person2 = new J.Class({extend : Person}, {
     init : function(name){
         this.name = name;
         alert("init");
     },
     showName : function(){
         alert(this.name);
 
     }
 
 });
    
};
参数:
{Object} option
= {extend: superClass} 在option对象的extend属性中指定要继承的对象,可以不写
{Object} object
扩展的对象
返回:
{Object} 返回生成的日期时间字符串