出版時(shí)間:2011-1 出版社:東南大學(xué)出版社 作者:David Flanagan 頁數(shù):1078
Tag標(biāo)簽:無
內(nèi)容概要
本書是一本針對JavaScript語言的核心內(nèi)容以及由瀏覽器定義的客戶端JavaScript應(yīng)用程序編程接口的程序員指南和綜合參考書。
本書第6版涵蓋了HTML 5和ECMAScript
5。為了介紹當(dāng)今Web開發(fā)的最佳實(shí)踐,很多章節(jié)被完全重寫過。這一版新添加的章節(jié)詳細(xì)講解了jQuery和服務(wù)器端JavaScript編程。
此書推薦給那些想學(xué)習(xí)Web編程技巧的有經(jīng)驗(yàn)的程序員,以及那些想要精通這門語言的JavaScript程序員。
作者簡介
作者:(美國)弗拉納根(David Flanagan) David Flanagan也是《The Ruby Programming》、《Java in a Nutshell》和《JavaScript Pocket Reference》的作者。
書籍目錄
Preface
1.Introduction to JavaScript
Part I.Core JavaScript
2.Lexical Structure
3.Types, Values, and Variables
4.Expressions and Operators
5.Statements
6.Objects
7.Arrays
8.Functions
9.Classes and Modules
10.Pattern Matching with Regular Expressions
11.JavaScript Subsets and Extensions.
12.Server-Side JavaScript.
Part II.Client-Side JavaScript
13.JavaScript in Web Browsers
14.The Window Object,
15.Scripting Documents
16.ScriptingCSS.
17.Handling Events
18.Scripted HTTP,
19.The jquery Library
20.Client-SideStorage.
21.Scripted Media and Graphics
22.HTML5 APIs
PartIII.CoreJavaScript Reference
Core JavaScript Reference
Part IV.Client-Side JavaScript Reference
Client-Side JavaScript Reference
Index
章節(jié)摘錄
版權(quán)頁: 插圖: Many classes define more specific versions of the toString() method. The toString() method of the Array class, for example, converts each array element to a string and joins the resulting strings together with commas in between. The toString() method of the Function class returns an implementation-defined representation of a function. In practice, implementations usually convert user-defined functions to strings of Java-Script source code. The Date class defines a toString() method that returns a humanreadable (and JavaScript-parsable) date and time string. The RegExp class defines a toString() method that converts RegExp objects to a string that looks like a RegExp literal:The other object conversion function is called value0f(). The job of this method is less well-defined: it is supposed to convert an, "ject to a primitive value that represents the object, if any such primitive value exists. Objects are compound values, and most objects cannot really be represented by a single primitive value, so the default valueOf() method simply returns the object itself rather than returning a primitive. Wrapper classes define value0f() methods that return the wrapped primitive value. Arrays,functions, and regular expressions simply inherit the default method. Calling valueOf() for instances of these types simply returns the object itself. The Date class defines a valueOf() method that returns the date in its internal representation: the number of milliseconds since January 1, 1970: With the toString() and valueOf() methods explained, we can now cover object-to-string and object-to-number conversions. Do note, however, that there are some special cases in which JavaScript performs a different object-to-primitive conversion. These special cases are covered at the end of this section. To convert an object to a string, JavaScript takes these steps: If the object has a toString() method, JavaScript calls it. If it returns a primitive value, JavaScript converts that value to a string (if it is not already a string) and returns the result of that conversion. Note that primitive-to-string conversions are all well-defined in Table 3-2. If the object has no toString() method, or if that method does not return a primitive value, then JavaScript looks for a valueOf() method. If the method exists, Java-Script calls it. If the return value is a primitive, JavaScript converts that value to a string (if it is not already) and returns the converted value. Otherwise, JavaScript cannot obtain a primitive value from either toString() or valueOf(), so it throws a TypeError.
編輯推薦
《JavaScript權(quán)威指南(影印版)(第6版)(套裝共2冊)》是一本專家級JavaScript程序員的必備參考,結(jié)構(gòu)合理,深入細(xì)節(jié)。涵蓋了HTML5和ECMAScript5。對于所有JavaScript開發(fā)人員都是不可或缺的一本參考書。
名人推薦
從1996年起,《JavaScript權(quán)威指南》就一直是JavaScript程序員的圣經(jīng)。盡管已經(jīng)印刷了五十多萬冊,網(wǎng)絡(luò)開發(fā)人員仍然對本書贊不絕口: “一本專家級JavaScript程序員的必備參考……結(jié)構(gòu)合理,深入細(xì)節(jié)?!?——Brendan Eich JavaScript的發(fā)明人,Mozilla首席技術(shù)官 “從《JavaScript權(quán)威指南》中學(xué)到的東西讓我開創(chuàng)了自己的事業(yè)?!?——Andrew Hedges Tapulous “《JavaScript權(quán)威指南》教給了我JavaScript?!?——Tbm Robinson 280 North共同創(chuàng)始人,Cappuccino共同發(fā)明人 “我知道JavaScript的哪些部分比較重要,從我那本《JavaScript權(quán)威指南》的書脊上某一區(qū)域的發(fā)皺程度就可以分辨出來?!?——J.Chris Anderson CouchBase的共同創(chuàng)始人,Apache CouchDB代碼貢獻(xiàn)者, 《CouchDB:The Deftnitive Guide》作者 “……對于所有JavaScript開發(fā)人員都不可或缺的一本參考書。如果我需要了解關(guān)于JavaScript的某個(gè)知識,我相信《JavaScript權(quán)威指南》會為我提供正確的答案。它就是這么棒?!?——Rey Bango 微軟Clien—Web社區(qū)項(xiàng)目經(jīng)理和jQuery團(tuán)隊(duì)成員
圖書封面
圖書標(biāo)簽Tags
無
評論、評分、閱讀與下載
JavaScript權(quán)威指南 第6版 PDF格式下載