日期:2014-05-16 浏览次数:20342 次
var animal = { name:"", setNameFunc: function(n){ this.name = n; }, getNameFunc:function(){ return this.name; } }; //alert(typeof animal) animal.setNameFunc("Dog"); document.write("<br> animal.getNameFunc() :"+animal.getNameFunc());