首页 > 其他 > 详细

constructor

时间:2016-07-10 21:27:44      阅读:97      评论:0      收藏:0      [点我收藏+]
 1 function Person(name){
 2     this.name = name;
 3 }
 4 Person.prototype = {
 5     constructor : Person,
 6 
 7     sayName : function(){
 8         console.info(this.name);
 9     },
10 
11     toString : function(){
12         return "[Person "+this.name+"]";
13     }
14 }

 

constructor

原文:http://www.cnblogs.com/zhanghuiyun/p/5658340.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!