- var MyClass = Class.create();
- MyClass.prototype = {
- initialize : function(){
- },
- method_1: function(){
- ......
- },
- method_2: function(event,className){
- ......
- }
- };
var MyClass = Class.create();
MyClass.prototype = {
initialize : function(){
},
method_1: function(){
......
},
method_2: function(event,className){
......
}
};
不知道,大家的写法是怎么样的
如果没有引用prototype.js的话,通常
- var MyClass = function(){
- ...to init...
- };
- MyClass.prototype = {
- initialize : function(){
- },
- method_1: function(){
- ......
- },
- method_2: function(event,className){
- ......
- }
- };