标签:style class prototype fun 原型 FN new ret 学习
function createFn(name){ this.name = name ; } createFn.prototype.study = function(){ return this.name+"在学习";; } var createFn2 = new createFn("tom"); alert(createFn2.study());//方法调用需要加括号。
标签:style class prototype fun 原型 FN new ret 学习
原文地址:https://www.cnblogs.com/l8l8/p/8886131.html