日期:2014-05-16  浏览次数:20329 次

javascript_王者归来_学习笔记(一)类和对象
第一种方式
     var obj = new Object();
    obj.a ="2";
    obj.b="3";
    obj.change=fucntion()
    {
alert('hello');
    }

第二种方式 
    var obj = {x:1,y:2}

第三种方式
    function test(x,y)
   {
     this.x = x;
     this.y=y;
   }