Head First JavaScript
by Michael Morrison
This errata page lists errors outstanding in the most recent printing.
If you have technical questions or error reports, you can send them to
booktech@oreilly.com. Please specify the printing date of your copy.
This page was updated February 11, 2008.
Here's a key to the markup:
[page-number]: serious technical mistake
{page-number}: minor technical mistake
<page-number>: important language/formatting problem
(page-number): language change or minor formatting problem
?page-number?: reader question or request for clarification
Confirmed errors:
{173}
The answer for the next-to-last NDQ needs to be completely changed. Instead of referring to current JS, it refers to JS2, which isn't supported in any real browsers yet. Here's a new answer:
<<<
A: Maybe. The current version of JavaScript (1.7) doesn't support true local scope for variables. Instead,
it supports function scope, which means variables within a given function are considered local variables
to that function. But just sticking a variable inside of a compound statement doesn't automatically make
it a local variable, although a future version of JavaScript will likely remedy this situation. The easy
way to remember it is that variables created inside of a function are local, while all others are global.
>>>
{273-274} The code in the exercise and the exercise solution should be changed from:
function doThis(num) {
return num++;
}
function doThat(num) {
return num--;
}
var x = doThis(11);
var y = doThat;
var z = doThat(x);
x = y(z);
y = x;
alert(doThat(z - y));
to:
function doThis(num) {
num++;
return num;
}
function doThat(num) {
num--;
return num;
}
var x = doThis(11);
var y = doThat;
var z = doThat(x);
x = y(z);
y = x;
alert(doThat(z - y));
{293} Third code block on page
The last line of the code block should not end with a semicolon. The code should read:
function showIt(theForm) {
alert(theForm["zipcode"].value);
}
{302} Second line of code block
The code in the onblur handler should end with a semicolon. This second line of code should read:
onblur="validateNonEmpty(this, document.getElementById('phone_help'));" />
{323} What's My Purpose exercise
For consistency, the positions of second and sixth answer options in the right column should be swapped
("The sub-pattern is required..." and "The sub-pattern is optional..."), so the ordering of the right
column matches the ordering on the following page of solutions.
{434} diagram at top
The box with the text "ceiling()" should instead contain the text "ceil()"
{434, 436} Exercise and Exercise solution
The second code line should read "Math.ceil(Math.PI)", not "Math.ceiling(Math.PI)"
没有合适的资源?快使用搜索试试~ 我知道了~
深入浅出JavaScript 随书源码
共148个文件
html:68个
png:41个
ds_store:26个
5星 · 超过95%的资源 需积分: 10 39 下载量 117 浏览量
2013-09-12
11:42:20
上传
评论
收藏 2.57MB RAR 举报
温馨提示
深入浅出JavaScript 随书源码 深入浅出JavaScript学习必备资料
资源推荐
资源详情
资源评论
收起资源包目录
深入浅出JavaScript 随书源码 (148个子文件)
donuts.css 350B
bannerocity.css 195B
.DS_Store 12KB
.DS_Store 12KB
.DS_Store 12KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
wait.gif 5KB
mandango8.html 8KB
youcube13.html 6KB
mandango7.html 6KB
sfa10.html 6KB
bannerocity6.html 5KB
mandango5.html 5KB
sfa9.html 5KB
youcube12.html 5KB
bannerocity3.html 5KB
bannerocity5.html 5KB
youcube11.html 5KB
mandango6.html 5KB
sfa8.html 5KB
youcube10.html 4KB
bannerocity4.html 4KB
sfa7.html 4KB
youcube9.html 4KB
bannerocity2.html 4KB
youcube7.html 4KB
youcube8.html 4KB
youcube6.html 4KB
mandango4.html 3KB
mandango3.html 3KB
youcube5.html 3KB
donuts5.html 3KB
bannerocity1.html 3KB
sfa6.html 3KB
sfa5.html 3KB
donuts4.html 3KB
sfa3.html 3KB
sfa4.html 3KB
mandango2.html 3KB
donuts3.html 3KB
sfa2.html 3KB
sfa1.html 2KB
mandango1.html 2KB
donuts2.html 2KB
donuts1.html 2KB
youcube4.html 2KB
house3.html 2KB
youcubeadd.html 2KB
youcube3.html 2KB
youcube2.html 2KB
youcube1.html 2KB
case1_4.html 2KB
case1_3.html 2KB
case1_2.html 2KB
case1_1.html 2KB
irock8.html 2KB
irock7.html 1KB
case2_8.html 1KB
case2_7.html 1KB
case2_6.html 1KB
case2_5.html 1KB
case2_9.html 1KB
irock6.html 1KB
case2_4.html 1KB
case2_3.html 1KB
case2_2.html 1KB
case2_1.html 1KB
irock5.html 1KB
house2.html 1KB
irock4.html 933B
housematches.html 666B
irock3.html 665B
house1.html 627B
irock2.html 278B
irock1.html 232B
ajax.js 2KB
cookie.js 970B
debug.js 841B
共 148 条
- 1
- 2
资源评论
- peterquan22013-09-25随书的源码,很给力哦
- nengge1591472013-10-12随书的源码,很给力哦
- didihe19882014-01-01不错。栗子很好。书写格式规范。
孤独能量
- 粉丝: 29
- 资源: 37
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功