javascriptのprototypeは関数で直接呼び出しとnewの違いです.
405 ワード
var Global={};
Global.Object=function(){
var self=this;
alert("Object ");
self.show();
}
Global.Object.prototype.show=function(){
alert("hello");
}
var go1=new Global.Object();// "Object " "hello"
Global.Object();// "Object " ,ie " " show