對象、構造函數、原型

1、建立對象的兩種方式 一、對象字面量 var person1 = { name: 'tt', age: 50, speak: function (text) { console.log(this.name + ' speak ' + text); } }; 二、構造函數 function Person
相關文章
相關標籤/搜索