function Parent() {
            this.Method = function() {
                alert("Parent Method");
            };
        };        function Son() {
            Parent.call(this);            this.Method = function() {
                alert("Son Method");
                (new Parent()).Method.call(this);   
            };
        };        function Grandson() {
            Son.call(this);
            this.Method = function(){
            alert("Grandson Method");
            (new Son()).Method.call(this);
            };
        };
 调用 Son的method是成功的,
  var s = new Son();
  s.Method();
 调用 Grandson的Method的失败,
  var g = new Grandson();
  g.Method();

解决方案 »

  1.   

    我这里跳出has no method 'call'
      

  2.   

    function Parent() {
      this.GetLength = function() {
    return 1;
      };
      };  function Son() {
      Parent.call(this);  this.Method = function() {
     
      (new Parent()).Method.call(this) + 1;   
    Uncaught TypeError: Cannot call method 'call' of undefined
      };
      };  function Grandson() {
      Son.call(this);
      this.Method = function(){
      
      (new Son()).Method.call(this) + 1;
      };
      };
     
      var s = new Son();
      s.Method();  var g = new Grandson();
      g.Method();