创建对象 对象属性 对象方法 随笔
var stu= new Object;
function Stu(name,old,sex){
this.name=name;
this.old=old;
this.sex=sex;
this.show=function(){
alert(this.name+" "+this.old+" "+this.sex)
}
}
stu["liujinyu"]=new Stu("liujinyu","23","man");
stu["wangle"]=new Stu("wangle","21","man");
stu["shaniu"]=new Stu("heli","11","woman");
for(propt in stu){alert(propt)}