最后更新时间:2011年12月12日

共91条勘误信息。其中:
1、36条已经在第2次印刷(2010年9月)的版本中修正;
2、32条已经在第4次印刷(2011年4月)的版本中修正;
3、4条已经在第5次印刷(2011年8月)的版本中修正;
4、9条已经在第6次印刷(2011年10月)的版本中修正;
5、10条将在第7次印刷(2011年12月)的版本中修正。
图示说明:
1、:此错误仅存在于第1次印刷的版本中(后续印次中已修正,下同);
2、:此错误仅存在于第1、2、3次印刷的版本中;
3、:此错误存在于第1、2、3、4次印刷的版本中;
4、:此错误存在于第1、2、3、4、5次印刷的版本中;
请读者根据自己手里书的印次核对和提交勘误。
点击查看为本书提供勘误的朋友。

快速页码导航

P3(1) |P6(1) |P11(1) |P14(1) | P15(1) | P16(1) | P18(1) | P25(1) | P30(1) | P37(1) | P39(1) | P48(1) | P63(1) | P69(1) | P81(1) | P87(1) | P89(2) | P90(1) | P91(2) | P93(1) | P100(1) | P105(1) | P107(1) | P119(2) | P120(1) | P126(2) | P127(1) | P128(1) | P133(1) | P136(1) | P140(1) | P148(1) | P152(1) | P154(1) | P161(1) | P163(1) | P169(1) | P179(1) | P191(1) | P204(1) | P217(1) | P218(1) | P221(1) | P224(2) | P233(1) | P237(1) | P245(1) | P249(1) | P256(1) | P286(1) | P294(1) | P300(1) | P315(1) | P326(1) | P344(2) | P355(1) | P378(1) | P379(1) | P387(2) | P448(1) | P466(1) | P467(1) | P468(1) | P469(1) | P470(1) | P472(1) | P510(1) | P511(3) | P527(1) | P532(1) | P533(1) | P542(1) | P544(1) | P549(1) | P551(1) | P554(2) | P557(1) | P560(1) | P568(1) | P569(1) | P570(1) | P571(1) | P577(1)

P3,图1-2中:
“EMCAScript” -> “ECMAScript”

P6,正数第九行:
“……Netscapet……” -> “……Netscape……”

P11,代码,第一段中的注释:


<!- 这里放内容 -->

->


<!-- 这里放内容 -->

第二段中的注释:


<!-- <!- 这里放内容 -->

->


<!-- 这里放内容 -->

正文,倒数第一段,第一行:
“HTML4.01” -> “HTML 4.01”

P14,正文,倒数第一段:
“框架型” -> “框架集型”

P15,正文,第二段,第一行:
“超级文档模式” -> “超级标准模式”

P16,倒数第三、四行:
“……,但只有IE支持该属性。” -> “……,但只有IE和Firefox 3.5+ 支持该属性。”

P18,3.1.3,第一、二段:
“反斜杠” -> “斜杠”

P25,附注框:
“……正和负……” -> “……负和正……”

P30,3.4.7上面一段:
去掉”null”和”undefined”的引号

P37,正文第四段(图3-2下方):
“注意,左移不会影响操作数的符号位。换句话说,……。”
->
“(删除这一段。因为原文这种说法不正确。——译者注)”

P39,代码,倒数第一段,第二行:
& & -> &&

P48,3.6.3 while语句,第二行:
“因引” -> “因此”

P63,正文第一段,第五行:
“当接下再……” -> “当接下来再……”

P69,4.3.1第三段第三句:
“而在此之后再被加上标记的变量” -> “而在此之后仍带有标记的变量”

P81,页脚,“译者注”中:
value2-value1 –> value1-value2

P87,正文,项目符号后第一段:
“不同组合产生不结果,……” –> “不同组合产生不同结果,……”

P89,倒数第十六、十七行(修改后,每个字符串前面多了一个空格):


"and dad"、"and baby"、"and dad and baby"

->


" and dad"、" and baby"、" and dad and baby"
P89,倒数第一和第五行(注释0->3):


alert(pattern1.lastIndex);//0

->


alert(pattern1.lastIndex);//3

P90,第五行(注释0->3):


alert(pattern2.lastIndex);//0

->


alert(pattern2.lastIndex);//3

P91,表中,第一个单元格内:
Input -> input
第一段代码,应该如下所示(注意注释中字符串及字符串中的空格):


if (pattern.test(text)){
    alert(RegExp.input);		// "this has been a short summer"
    alert(RegExp.leftContext);	// "this has been a "
    alert(RegExp.rightContext);	// " summer"
    alert(RegExp.lastMatch);	// "short"
    alert(RegExp.lastParen);	// "s"
    alert(RegExp.multiline);	// false
}

P93,正文第二段,第二行:
“……,没用必要……” -> “……,没有必要……”

P100,正文5.6.1标题往上数4行:
“……,而且所有基本包装类型的对象都会被转换成布尔值true。”
->
“……,而且所有基本包装类型的对象在布尔环境中都会被转换成布尔值 true。”

P105页,倒数第二行:


alert(pattern.lastIndex		//0

->


alert(pattern.lastIndex);	//3

P107,第一行:
“表示应该被替换的匹配项使用函数……” -> “表示应该被替换的匹配项。使用函数……”

P119,倒数第三段,第三行:
“……在所函数的指针” -> “……所在函数的指针”

P119,这一页多次出现“原型属性”或“prototype属性”等不恰当表述,应该改为“原型对象”。为准确起见,这里给出一个与目前纸版书大致相同的PDF页面,并用修订版式标出了修改的地方(直接点击打开,右键点击选“链接另存为”可以下载):
请下载P119勘误(1页)P119页的修订页面(PDF,347KB)

P120,图 6-1:
Person1、Person2 -> person1、person2

P126,图6-3,上下两幅子图中,含有__proto__的两个方框:
“Person” -> “person”
P126,图6-3,第二个子图的标题:
“重写原型对象之前”
->
“重写原型对象之后”

P127,第20-21行,即灰色框上面倒数第一行:
“mgs” -> “msg”

P128,代码,第二段,第7行:
Person.protoype -> Person.prototype

P133,第一段第二句:
“最终结果就是这样的:instance指向……。”
->
“最终结果就是这样的:instance指向SubType的原型,SubType的原型又指向SuperType的原型。”

相应地,P133页下方的“译者注”:
“实际上,不是SubType.prototype的……。——译者注”
->
“实际上,不是SubType的原型的constructor属性被重写了,而是SubType的原型指向了另一个对象——SuperType的原型,而这个原型对象的constructor属性指向的是SuperType。——译者注”

P136,第一段代码,第二行后面的注释应该在第三行后面。

P140,图6-6,左侧第一列对象框,上数第二个对象框中的函数名称:
SubType -> SuperType。

P148,代码第一段,倒数第二行:


document.write(funcs[i]() + "<br />");

改为:


document.write(funcs[i](i)() + "<br />");

P152,代码三中的注释。
//函数的私有变量 -> //私有变量和私有函数

P154,第一段代码,倒数第二行:alert(person1)…->alert(person)…

P161,倒数第三段,倒数第二行:
“在Firefox和Safari中,screenTop……”
->
“在Firefox和Safari中,screenY或screenTop……”

P163,第二段代码:


window.open("http://www.wrox.com/", topFrame");

->


window.open("http://www.wrox.com/", "topFrame");

P169,正文第三段第四行:
“……,那么这个两……”
改为:
“……,那么这两个……”

P179,正文倒数第二段第一句:
“……document.getElementsById()……” -> “……document.getElementById()……”

P191,代码第一段阴影部分:


engine.ver = browser.ver = RegExp["$1"];
engine.ie = browser.ie = parseFloat(engine.ver);

改为:


engine.ver = RegExp["$1"];
engine.ie = parseFloat(engine.ver);

P204,正文第一行:
“DOM(档对象模型)……” -> “DOM(文档对象模型)……”

P217,正文第一行:
“……字符串”</scr>” + “ipt>”……” -> “……字符串”</scr” + “ipt>”……”

P218,正文第一段第二行:
“……;而在XML(包括XHTML)中,……” -> “……;而在XML(有时候也包括XHTML)中,……”

* 此处原书有错误。

P221,正文(阴影框中)倒数第一行:
“尽管IE8已经解决了这些问题,但我们仍然不建议通过属性来设置特性。”
->
“尽管到了IE8才解决这些问题,但我们还是推荐通过属性来设置特性。”
P224,正文倒数第一行:
“nodeTpye” -> “nodeType”

P224,正文第六行(列表第三项)中:
“<buttou>” -> “<button>”
P224,正文倒数第一行:
“nodeTpye” -> “nodeType”

P233,正文倒数第二段,第一句:
“结果” -> “result”

P237,代码倒数第一段,第一行:


... onclick=\"alert('hi")\"....

->


... onclick=\"alert('hi')\"....

P245,代码第二段,加阴影的那一行:


for (var i=0 len=divs.length; i < len; i++){

->


for (var i=0, len=divs.length; i < len; i++){

P249,正文第12行:


……,其 nodeName 等于 prefix+" : "+ ocalName。

->


……,其 nodeName 等于 prefix+" : "+ localName。

P256,正文第二段最后一句:
“以下代码既输出CSS属性值,也输入值的类型”
->
“以下代码既输出CSS属性值,也输出值的类型”

P286,代码第三段,倒数第2行:


< /script >

->


</script>

P294,表格后第一段文字,第二行中的:
event.srtElement
->
event.srcElement

P300, “4.相关元素”下第一行:
“mouserout” -> “mouseout”

P315, 中间代码段中所有的斜双引号,改为直双引号:

P326,正文第二个列表第三项:
“changeTouches” -> “changedTouches”

P344,正文第二行括号中:
“<inpu>元素” -> “<input>元素”
P344,正文第三行开头:
“<textarea/>” -> “</textarea>元素”

P355,代码,第二段:


selectbox.remove(0);

改为:


selectbox.remove(i);

P378, 代码第二段,加阴影的那一行:


if (typeof.values.sort == "function"){

->


if (typeof values.sort == "function"){

P379, 代码第二段,第三行(问号后面的查询字符串中多了两个空格):


"http://www.someotherdomain.com?a=b &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; c=d");

->


"http://www.someotherdomain.com/?a=b&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;c=d");

P387,正文第一行:
“由于不能在COM对象……” -> “由于不能在DOM对象……”
P387,正文第二段(14.5.4第一段),倒数第一句:
“<span>” -> “<p>”

代码第一行:


span.innerHTML = "<div>Hi</div>"    //这里,span包含了<div>元素

->


p.innerHTML = "<div>Hi</div>"    //这里,p包含了<div>元素

P448,代码第二段,第二行(条件赋值部分的第二个值多了两个空格):


url += (url.indexOf("?") == -1 ? "?" : " &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; ");

->


url += (url.indexOf("?") == -1 ? "?" : "&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;");

P466,正文,第三段,第三行:
“……被返回的数组的第一个元素应该是第二个参数” -> “……被返回的数组包含从第二个参数开始的所有参数”

P467,18.2第一段,第三行:
“……某个执行时间” -> “……某个时间执行”

P468,正文,第四段,第一行:
“事件处理器设置了一个250ms中调用的定事器” -> “事件处理程序设置了一个250ms后调用的定时器”

P469,代码,第一行:
//单调用 -> //早调用

P470,中间阴影框的第二行:
“跨浏览器” -> “跨窗口”

P472,第五段(三级标题18.2.3上面一段):
“……200ms以上的事件……” -> “……200ms以上的时间……”

P510,代码倒数第二行(加阴影的那一行):


for (var i=values.length; i >= 0; i--) {

->


for (var i=values.length-1; i >= 0; i--) {

P511,代码第二段:


var i = values.length;
do {
    process(values[i]);
} while (i-- >= 0);

->


var i = values.length-1;
do {
    process(values[i--]);
} while (i >= 0); 
P511,代码倒数第二段,第二行:


var iterations = Math.ceil(values.length / 8);

->


var iterations = Math.floor(values.length / 8);
P511, 正文倒数第二行:
“然后根据取整的上限函数……” -> “然后根据取整的下限函数……”

P527,代码,第一段:


Var classNames = div.className.split(/\s+/);

//找到要删除的类名
varpos = -1;
for (vari=0,len = className.length;i<len;i++){
      if(classNames[i] == "user"){
            pos=i;
            break;
      }
}

//删除类名
classNames.splice(i,1);

->


var classNames = div.className.split(/\s+/);

//找到要删除的类名
var pos = -1;
for (var i = 0, len = classNames.length; i<len; i++){
      if(classNames[i] == "user"){
            pos = i;
            break;
      }
}

//删除类名
classNames.splice(pos,1);

P532,代码,第一段,第二行(value属性前应该有一个空格):


<input type="button"value="Play" id="video-btn" />

->


<input type="button" value="Play" id="video-btn" />

P533,代码,第一段:
If ->if
Var -> var

P542,代码,倒数第一段,第五行(var与row之间应该有一个空格):


varrow=results.rows.item(i);

->


var row = results.rows.item(i);

P544,第二个有序列表,:
删掉事件名前面的句点。

P549,代码,第三段,第六行:


set ame(value){

->


set name(value){

P551,代码,第一段,第三行(R应为小写的r):


Return (item > 2);

->


return (item > 2);

P554,代码,第一段,第三、四行:


for (var i=0; I < 10; i++){
    Yield I * 2;
}

->


for (var i=0; i < 10; i++){
    yield i * 2;
}

正文第二段,第一句:
“my Numbers” -> “myNumbers”

P554,代码,倒数第一段,第八行(let与value间应有一个空格):


letvalue=iterator.next();

->


let value = iterator.next();

P557,代码,第二段,第一行:


var {age:personage} = person;

->


var {age:personAge} = person;

P560,正文,倒数第一行(typeof与null之间应该有一个空格):
“如typeofnull……” -> “如typeof null”

P568,代码,倒数第一段,倒数第一行(最后少了一个括号):


alert(person.getPersonType();

->


alert(person.getPersonType());

P569,22.1.11节,正文第二段,倒数第一行:
“oisMyClass” -> “o is MyClass”
“oisEventTarget” -> “o is EventTarget”

P570,正文第一段,倒数第一行:
“meisPerson” -> “me is Person”
“meisEmployee” -> “me is Employee”

P571,正文倒数第一段,第三行开头(I应该为小写的i):
“Iterator命名空间……” -> “iterator命名空间……”

P577,代码,第二段(页面中部的代码),最后一行:


alert(mapg.et("statusbar"));

->


alert(map.get("statusbar"));

特别鸣谢以下热心朋友提供勘误。

  • @Hiro(21)
  • @凌空一叶(17)
  • @Daild(6)
  • @余秉烨(5)
  • @sunnylost(4)
  • @dishuostec(3)
  • @air(3)
  • @裕波(2)
  • @gengv(2)
  • @jlulamplamp(2)
  • @snowqiang(2)
  • @Franko(1)
  • @千年一梦(1)
  • @yuhu(1)
  • @lpbottle(1)
  • @lenter(1)
  • @孙博(1)
  • @东方龙马(指出本勘误中的错误)
  • @Alpha tang(指出本勘误中的错误)

朋友们的留言

  1. chanel j12 watches | 12月 30th, 2011 at 10:18

    I’ve dealt with

    Reply to this comment
  2. chanel j12 watches | 12月 30th, 2011 at 10:19

    the deaths of both parents

    Reply to this comment
  3. chanel j12 watches | 12月 30th, 2011 at 10:19

    beloved boss and

    Reply to this comment
  4. chanel j12 watches | 12月 30th, 2011 at 10:20

    cherished pets.

    Reply to this comment
  5. chanel j12 watches | 12月 30th, 2011 at 10:21

    before my eyesor slow and

    Reply to this comment
  6. chanel j12 watches | 12月 30th, 2011 at 10:21

    Bad stuff, and it belongs

    Reply to this comment
  7. chanel j12 watches | 12月 30th, 2011 at 10:22

    Some of these deaths

    Reply to this comment
  8. chanel j12 watches | 12月 30th, 2011 at 10:22

    have been violent

    Reply to this comment
  9. moncler jacket | 12月 30th, 2011 at 10:26

    at the bottom of the scale.

    Reply to this comment
  10. moncler jacket | 12月 30th, 2011 at 10:27

    Then there are those high points:

    Reply to this comment
  11. moncler jacket | 12月 30th, 2011 at 10:28

    romance and marriage to the right person

    Reply to this comment
  12. moncler jacket | 12月 30th, 2011 at 10:28

    having a child and doing

    Reply to this comment
  13. moncler jacket | 12月 30th, 2011 at 10:29

    those Dad things like coaching

    Reply to this comment
  14. moncler jacket | 12月 30th, 2011 at 10:30

    my son’s baseball team, paddling

    Reply to this comment
  15. moncler jacket | 12月 30th, 2011 at 10:30

    while he’s swimming with the dogs

    Reply to this comment
  16. moncler jacket | 12月 30th, 2011 at 10:32

    discovering his compassion so deep

    Reply to this comment
  17. moncler jacket | 12月 30th, 2011 at 10:33

    kindness to snails, his imagination

    Reply to this comment
  18. moncler boots | 12月 30th, 2011 at 10:33

    a spaceship from

    Reply to this comment
  19. moncler boots | 12月 30th, 2011 at 10:34

    a scattered pile of Legos.

    Reply to this comment
  20. moncler boots | 12月 30th, 2011 at 10:37

    But there is vast meadow of life in the middle

    Reply to this comment
  21. moncler boots | 12月 30th, 2011 at 10:37

    at the wasted effort. Summer turned brutal

    Reply to this comment
  22. moncler boots | 12月 30th, 2011 at 10:38

    vast meadow of life in the middle

    Reply to this comment
  23. moncler boots | 12月 30th, 2011 at 10:42

    where the bad and the good flip-flop

    Reply to this comment
  24. moncler boots | 12月 30th, 2011 at 10:42

    what convinces me to believe in the 50-percent theory.

    Reply to this comment
  25. moncler boots | 12月 30th, 2011 at 10:44

    in a bottomland so flood-prone

    Reply to this comment
  26. moncler boots | 12月 30th, 2011 at 10:46

    that neighbors laughed. I felt

    Reply to this comment
  27. armani watch sale | 12月 30th, 2011 at 10:52

    the marriage ended,

    Reply to this comment
  28. armani watch sale | 12月 30th, 2011 at 10:53

    money gone. I was living

    Reply to this comment
  29. armani watch sale | 12月 30th, 2011 at 11:11

    lyrics from a country tune

    Reply to this comment
  30. armani watch sale | 12月 30th, 2011 at 11:15

    music I loathed. Only a surging Kansas

    Reply to this comment
  31. armani watch sale | 12月 30th, 2011 at 11:35

    team, bound for their first World Series

    Reply to this comment
  32. armani watch sale | 12月 30th, 2011 at 12:02

    Looking back on that horrible summer

    Reply to this comment
  33. armani watch sale | 12月 30th, 2011 at 12:05

    I soon understood that all succeeding

    Reply to this comment
  34. armani watch sale | 12月 30th, 2011 at 12:06

    the bad. Worse than normal

    Reply to this comment
  35. armani watch sale | 12月 30th, 2011 at 12:19

    wouldn’t last long. I am owed and savor

    Reply to this comment
  36. 京拾 | 01月 19th, 2012 at 10:32

    什么时候能买到第5次印刷的书呢?

    Reply to this comment
  37. 为之漫笔 | 01月 19th, 2012 at 11:07

    现在就可以买到,但应该是更新印次的。

    Reply to this comment

我来说两句儿

可以在留言中使用以下标签 :<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree