functionPerson(){//构造方法 } Person.prototype={ name:"张三", age:22, gender:"男", eat:function(s){ alert("我吃:"+s); } }; varp=newPerson(); functionUser(pwd){ varpasswd=pwd;//私有 functiongetPwd(){//私有 returnpasswd; } this...
分类:
编程语言 时间:
2015-06-09 06:18:46
阅读次数:
108