方法可以赋值给属性,反之则不能。属性跟随方法,方法跟随Windows, 方法: function tmd(){ alert(1); } 先由对象 obj才有obj的属性: var obj={ //属性 x:function(){ alert(1); } }