2020年7月3日
摘要: <!-- 理解原型 --> <script> function Person(name){ this.name=name } Person.prototype.age=10 var person1 = new Person() var person2 = new Person() console.l 阅读全文
posted @ 2020-07-03 15:40 猪mother 阅读(182) 评论(0) 推荐(0) 编辑
摘要: <!-- 函数的重要性 --> <script> // <1>函数是第一类对象:javascrip中函数拥有对象的所有能力 //对象能做的任何一件事,函数都能做 //函数的特别之处在于它是可调用的,可以被调用来执行某项操作 // 1.函数的创建方式 //(1)通过字面量创建 function foo 阅读全文
posted @ 2020-07-03 14:53 猪mother 阅读(236) 评论(0) 推荐(0) 编辑