javascript基礎學習七

回顧: 1、 function Student (name , age ){ this.name = name; this.age = age; } Student.prototype = {//第一句執行 sayHello : function(){ console.log("nihao"); } }; var p = new Student('zhansa',19); 代碼分析: 1、首先預解
相關文章
相關標籤/搜索