原文地址: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);
    }
}

相关文章:

  • 2021-05-27
  • 2021-10-17
  • 2021-09-25
  • 2021-10-11
  • 2021-09-11
  • 2022-01-11
  • 2021-06-01
  • 2022-02-09
猜你喜欢
  • 2022-02-25
  • 2021-10-26
  • 2021-03-31
  • 2021-12-23
  • 2021-04-16
  • 2021-07-03
相关资源
相似解决方案