声明: function person(name, country) { this.name = name; this.country = country; } 实例化对象: var theauthor = new person('Daniel', 'U.S.A.'); 引用: function sayHello(objPerson) { return "Hello " + objPerson.name; } document.write( sayHello(theauthor) );