(function(){function Fn(){}Fn.prototype.method=function(){//some Method in Fn.prototype}})();
1 回答
忽然笑
TA贡献1806条经验 获得超5个赞
(function(){
function Fn(){
}
Fn.prototype.method=function(){
//some Method in Fn.prototype
}
window.Fn=Fn;
})();
var fn=new Fn();
console.log(typeof fn.method=="function");
添加回答
举报
0/150
提交
取消