解决方案 »

  1.   

    他举的例子是var Cat = {
        name: "大毛",
        makeSound: function(){ alert("喵喵喵"); }
      };
      

  2.   

    他举的例子是var Cat = {
        name: "大毛",
        makeSound: function(){ alert("喵喵喵"); }
      };
    你应该用这种var Cat = {
        createNew: function(){
          var cat = {};
          cat.name = "大毛";
          cat.makeSound = function(){ alert("喵喵喵"); };
          return cat;
        }
      };
      

  3.   

    我看了说好的模拟类
    http://docs.sencha.com/extjs/4.2.2/#!/guide/class_system
    http://docs.telerik.com/kendo-ui/tutorials/inheritance-with-kendoui
    http://api.jqueryui.com/jQuery.widget/
      

  4.   

    反正要模拟这些类方法
    extend  implement  statics                      minin
    ext最全。
    看看  那是jquery老人家写的。
    http://ejohn.org/blog/simple-javascript-inheritance/
    我没认真看过,tinymce提过。