function Foo() { } Foo.prototype.getName = function () { alert(3); }; var foo = new Foo(); foo.getName(); Foo.getName(); 查看完整描述