原文地址:http://www.blueidea.com/tech/web/2009/7264.asp
1.对象字面量:
var person = { name:null, setName:function(name){ this.name = name; return this.name; }, getName:function(){ alert(this.name); }}