我写了以下一段代码,打算让子类自动继承父类的prototype的,
Function.method("inherits", function(Parent){
                this.prototype = new Parent();
                return this;
        });
        var Mammal = function(name){
                this.name = name;
        };
        Mammal.prototype.get_name = function(){
                return this.name;
        };
        Mammal.prototype.says = function(){
                return this.saying || "";
        };
        var Cat = function(name){
                this.name = name;
        }.inherits(Mammal);
        var myCat = new Cat("cow zi!");
        alert(myCat.says);但是firebug就提示说Function.method不是一个函数,不能这样定义,请问这个程序错在哪里呢?该注意点什么呢??谢谢prototypefunction