标签:prot function this getname turn get name his func
function Foo(){
getName=function(){alert(1)};
return this;
}
Foo.getName=function(){alert(2)};
Foo.prototype.getName=function(){alert(3)};
var getName=function(){ alert(4)};
function getName(){alert(5)};
Foo.getName();//2
getName(); //4
Foo().getName()// 1
getName();//1
new Foo.getName(); //2
标签:prot function this getname turn get name his func
原文地址:http://www.cnblogs.com/H5C3XXN/p/7361847.html