日期:2014-05-16 浏览次数:20448 次
function member(sName,sGender,iAge,sProfession){ this.name = sName; this.sex = sGender; this.age = iAge; this.job = sProfession; } member.prototype.showMemberInfo = function(obj){ for(var i = 0 in obj){ alert(i + ": " + obj[i]); } } var LDH = new member("刘德华","男",45,"艺人"); LDH.showMemberInfo(LDH);