摘要:
var People=function(){ this.name='liujinyu'; }; People.prototype={ age:24, add:function(){}, } var p1 = new People(); for(n in p1){ document.write(n+":"+p1[n]+" / "+p1.hasOwnProperty(n)); document.write(""); } //name true //age false //add false 阅读全文