<SCRIPT LANGUAGE="JavaScript"> <!-- Member = function(name, id){ this.name = name ; this.id = id ; } Member.prototype = { setValue: function(newName, newId){ this.name = newName; this.id = newId; }, getName: function(){ return this.name; }, getId: function(){ return this.id; } } var mem1 = new Member(); mem1.setValue("홍길동", "hong"); document.write(mem1.getName()); document.write(mem1.getId()); //--> </SCRIPT> |