摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>06-认识原型</title> <script> function Person(name,sex,age){ this.name = name; this.sex 阅读全文
posted @ 2016-11-22 09:26 小确幸qh 阅读(115) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>05-继承的概念</title> <script> /* function Dog (color,name){ this.skinColor = color; th 阅读全文
posted @ 2016-11-22 09:23 小确幸qh 阅读(683) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>04-apply和call方法</title> <script> // apply和call方法 // 作用:可以设置函数的具体调用者,来修改函数的作用域 // 第 阅读全文
posted @ 2016-11-22 09:13 小确幸qh 阅读(157) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>03-构造函数</title> <script> // 构造函数就是一种专门用来创建对象的一种函数 // 使用系统原生的构造函数创建对象 // var studen 阅读全文
posted @ 2016-11-22 08:54 小确幸qh 阅读(148) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>02-工厂模式</title> <script> /* // 函数在执行的时候,执行环境的作用域是当前函数的调用者 function testThis (){ co 阅读全文
posted @ 2016-11-22 08:47 小确幸qh 阅读(207) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>02-工厂模式</title> <script> /* // 函数在执行的时候,执行环境的作用域是当前函数的调用者 function testThis (){ co 阅读全文
posted @ 2016-11-22 08:44 小确幸qh 阅读(130) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>01-回顾对象</title> <script> // 字面量定义对象 // 定义对象属性的方式:驼峰命名法,以字母、下划线、$开头,之后可以使用字母、下划线、$、 阅读全文
posted @ 2016-11-22 08:42 小确幸qh 阅读(182) 评论(0) 推荐(0) 编辑