目录:
第一章:简介
1. 一点儿历史
2. 变幻之风
3. 当下
4. 未来
5. 面向对象编程
对象
类
封装
聚合
继承
多态
6. oop概要
7. 设置环境
获取需要的工具
8. 使用firebug控制台
9. 小结
第二章:简单数据类型,数组,循环和条件
1. 变量
变量大小写敏感
2. 运算符
3. 简单数据类型
找出值的类型——typeof运算符
4. 数值(numbers)
八进制和十六进制数
指数常量
无穷大
非数字
5. 字符串(strings)
字符串转换
特殊字符串
6. 布尔型(booleans)
逻辑运算符
运算符优先级
惰性计算
比较
7. 未定义(undefined)和空(null)
8. 原始数据类型概要重述
9. 数组(Arrays)
增改数组元素
删除元素
数组的数组
10. 条件语句和循环
代码块
if
检查变量是否存在
if的二选一
switch
循环
while
do while
for
for-in
11. 注释
12. 小结
13. 练习
第三章:函数
1. 什么是函数?
函数调用
参数
2. 预定义函数
parseInt()
parseFloat()
isNoN()
isFinite()
Encode/Decode URIs
eval()
alert()
3. 变量作用域
4. 作为值的函数
匿名函数
回调函数
回调实例
自调用函数
内部函数
返回一个函数的函数
函数,重写自身!
5. 闭包
作用域链
词法的作用域
6. 用闭包跳出作用域链
closure #1
closure #2
一个定义和closure #3
循环内的闭包
7. getter/setter
8. 迭代器
9. 小结
10. 练习
第四章:对象
1. 从数组到对象
元素,属性,方法
哈希表,关联数组
访问对象的属性
调用对象的方法
使用this
构造器函数
全局对象
构造器属性
instanceof运算符
返回对象的函数
可传递的对象
比较对象
firebug控制台里的对象
2. 内建对象
Object
Array
有趣的数组方法
Function
函数对象的属性
函数对象的方法
可回访的对象参数
Boolean
Number
String
有趣的String对象方法
Math
Date
和Date对象有关的方法
RegExp
RegExp对象的属性
RegExp对象的方法
接受正则表达式作参数的String 方法
search()和match()
replace()
Replace回调
split()
当需要regexp的时候传递一个String
3. 小结
4. 练习
第五章:原型(Prototype)
1. 原型属性
使用原型新增方法和属性
使用原型的方法和属性
自有属性VS原型属性
用自有属性重写原型属性
枚举属性
isPrototypeOf()
_proto_的秘密
2. 扩建内置对象
扩建内置对象的讨论
原型陷阱
3. 小结
4. 练习
第五章:继承
1. 原型链
原型链实例
将共享属性移进原型对象
2. 仅仅继承原型对象
临时构造函数——new F()
3. 特权——从子对象访问父对象
4. 将可继承部分独立成函数
5. 复制原型
6. 通过引用复制时的警告
7. 继承对象的对象
8. 深复制
9. object()
10. 结合使用原型继承和属性复制
11. 多继承
多态
12. 寄生式继承
13. 采用构造器
采用构造器复制其原型
14. 小结
15. 案例学习:画图
分析
实现
测试
16. 练习
第七章:浏览器对象
1. html导入javascript
2. BOM和DOM——概览
3. BOM
window对象重访
window.navigator
Firebug 速查
window.location
window.history
window.frames
window.screen
window.open()/close()
window.moveTo(),window.resiztTo()
window.alert(),window.prompt(),window.confirm()
window.setTimeout(),windos.setInterval()
window.document
4. DOM
DOM核心和Html DOM
访问DOM节点
document 节点
documentElement
子节点
属性
访问标签内部内容
DOM访问捷径
兄弟,身体,首尾节点
遍历DOM
修改DOM节点
修改样式
好玩的表单
创建新节点
DOM-Only的方法
cloneNode()
insertBefore()
移除节点
HTML-Only的DOM对象
使用原始方法访问Document
document.write()
Cookies,Title,Referrer,Domain
5. Events
html内联属性
Element属性
DOM事件监听
捕捉和冒泡
停止冒泡
阻止默认
跨浏览器事件监听
事件类型
6. XMLHttpRequest
发送请求
处理应答
在ie7之前版本创建XMLHttpRequest对象
A代表异步
X代表XML
一个实例
7. 小结
8. 练习
第八章:编码与设计模式
1. 编码模式
分离行为
内容
描述
行为
行为分离的实例
命名空间
作为空间的对象
命名的构造器
namespace()
Init-Time分支
延迟定义
Configuration Object
私有化属性和方法
特殊方法
私有函数作为公共方法
自执行函数
链接
JSON
2. 设计模式
单例
单例2
全局变量
构造器的属性
私有属性
工厂
装饰者
装饰一棵圣诞树
观察者
3. 小结
附录A:保留字
关键字
未来的保留字
附录B:内置函数
附录C:内置对象
Object
array
Function
Boolean
Number
String
Date
Math
RegExp
Error
附录D:正则表达式
索引