标签:style blog io ar color sp on div log
function Person(age){ var name = "Lala"; //私有变量 this.age = age; //公有变量 this.getName = function(){ //公有函数 return name; } } var p1 = new Person("Ho"); document.writeln(p1.getName()); // Lala document.writeln(p1.name); //undefin
标签:style blog io ar color sp on div log
原文地址:http://www.cnblogs.com/lcw5945/p/4143265.html