学习JavaScript(影印版)
学习JavaScript(影印版)
Shelley Powers
出版时间:2007年07月
页数:335
无论你是从头开始学习JavaScript,还是只想复习一下,《学习JavaScript》都为你提供了一条穿越JavaScript内在能量与外在特性的捷径。
JavaScript作为Ajax的关键部分又重新回到了聚光灯下,赋予网站更多的智能并给访客提供更有用的交互内容。JavaScript亦已超越Web而蔓延至编程领域,给其他软件提供了一种便利的脚本语言。
本书中基于Web的实例展示了如何构建JavaScript逻辑、如何将其与现有的对象结
构相连接以及如何构建你的程序库和利用他人编写的程序库。
《学习JavaScript》将探索以下主题:
*基本的JavaScript逻辑,从函数、操作符到控制结构
*在多浏览器并存的Web世界里可靠地使用JavaScript的技巧
*JavaScript的各种扩展机制以及它们与传统面向对象编程的区别
*处理传统JavaScript任务,如表单验证、DOM操作和交互样式
*JavaScript的安全性,包括Web浏览器沙箱、cookie以及与其他对象的交互
*创建对象库以处理一般任务
*用JavaScript和XMLHttpRequest对象构建Ajax应用程序
*为特殊效果和Ajax交互使用程序库
无论你是曾经使用过一些JavaScript的Web设计者、需要学习JavaScript的程序员,还是仅仅想在Web上做一点东西的开发新手,《学习JavaScript》都将告诉你如何把这个强大的脚本语言用于应对你所遇到的最新挑战。
Shelley Powers是一位软件开发者、摄影师和著有多本O'Reilly图书的作家,她的著作有《Developing ASP Components》、《Unix Power Tools》第三版、
《Essential Blogging》和《Practical RDF》等。她的第一本JavaScript著作于1996年出版,随后于1997年又出版了一本关于动态HTML(DHTML)的书。Shelley也曾为多家刊物撰写过若干篇关于跨浏览器开发、JavaScript、CSS和XML的技术文章。Shelley的技术网站是:http://burningbird.net。
  1. Preface
  2. 1. Introduction and First Looks
  3. Twisted History: Specs and Implementations
  4. Cross-Browser Incompatibility and Other Common JavaScript Myths
  5. What You Can Do with JavaScript
  6. First Look at JavaScript: “Hello World!”
  7. The JavaScript Sandbox
  8. Accessibility and JavaScript Best Practices
  9. 2. JavaScript Data Types and Variables
  10. Identifying Variables
  11. Scope
  12. Simple Types
  13. Constants: Named but Not Variables
  14. Questions
  15. 3. Operators and Statements
  16. Format of a JavaScript Statement
  17. Simple Statements
  18. Conditional Statements and Program Flow
  19. The Conditional Operators
  20. The Logical Operators
  21. Advanced Statements: The Loops
  22. Questions
  23. 4. The JavaScript Objects
  24. The Object Constructor
  25. The Number Object
  26. The String Object
  27. Regular Expressions and RegExp
  28. Purposeful Objects: Date and Math
  29. JavaScript Arrays
  30. Associative Arrays: The Arrays That Aren’t
  31. Questions
  32. 5. Functions
  33. Defining a Function: Let Me Count the Ways
  34. Callback Functions
  35. Functions and Recursion
  36. Nested Functions, Function Closure, and Memory Leaks
  37. Function As Object
  38. Questions
  39. 6. Catching Events
  40. The Event Handler at DOM Level 0
  41. Questions
  42. 7. Forms and JiT Validation
  43. Accessing the Form
  44. Attaching Events to Forms: Different Approaches
  45. Selection
  46. Radio Buttons and Checkboxes
  47. Input Fields and JiT Regular Expressions
  48. Questions
  49. 8. The Sandbox and Beyond: Cookies, Connectivity, and Piracy
  50. The Sandbox
  51. All About Cookies
  52. Alternative Storage Techniques
  53. Cross-Site Scripting (XSS)
  54. Questions
  55. 9. The Basic Browser Objects
  56. BOM at a Glance
  57. The window Object
  58. Frames and Location
  59. history, screen, and navigator
  60. The all Collection, Inner/Outer HTML and Text, and Old and New
  61. Documents
  62. Something Old, Something New
  63. Questions
  64. 10. DOM: The Document Object Model
  65. A Tale of Two Interfaces
  66. The DOM and Compliant Browsers
  67. The DOM HTML API
  68. Understanding the DOM: The Core API
  69. The DOM Core Document Object
  70. Element and Access in Context
  71. Modifying the Tree
  72. Questions
  73. 11. Creating Custom JavaScript Objects
  74. The JavaScript Object and Prototyping
  75. Creating Your Own Custom JavaScript Objects
  76. Object Detection, Encapsulation, and Cross-Browser Objects
  77. Chaining Constructors and JS Inheritance
  78. One-Off Objects
  79. Advanced Error-Handling Techniques (try, throw, catch)
  80. What’s New in JavaScript
  81. Questions
  82. 12. Building Dynamic Web Pages: Adding Style to Your Script
  83. DHTML: JavaScript, CSS, and DOM
  84. Fonts and Text
  85. Position and Movement
  86. Size and Clipping
  87. Display, Visibility, and Opacity
  88. Questions
  89. 13. Moving Outside the Page with Ajax
  90. Ajax: It’s Not Only Code
  91. How Ajax Works
  92. Hello Ajax World!
  93. The Ajax Object: XMLHttpRequest and IE’s ActiveX Objects
  94. Working with XML—or Not
  95. Google Maps
  96. Questions
  97. 14. Good News: Juicy Libraries! Amazing Web Services! Fun APIs!
  98. Before Jumping In, A Word of Caution
  99. Working with Prototype
  100. Script.aculo.us: More Than the Sum of Its Periods
  101. Sabre’s Rico
  102. Dojo
  103. The Yahoo! UI
  104. MochiKit
  105. Questions
  106. Appendix: Answers
  107. Index
书名:学习JavaScript(影印版)
作者:Shelley Powers
国内出版社:东南大学出版社
出版时间:2007年07月
页数:335
书号:978-7-5641-0779-6
原版书出版商:O'Reilly Media
Shelley Powers
 
Shelley Powers从JavaScript初次开发到现在最新的图形和设计工具发布,Shelley Powers已经从事Web技术工作和写作达15年之久。她最近在O’Reilly出版的图书包括语义网、Ajax、JavaScript和Web图形。她是一位热情的业余摄影师,也是Web开发的狂热爱好者,她从JavaScript刚发布时,就开始使用和编写Web技术相关书籍。她之前在O’Reilly出版了8本书,包括Developing ASP Components(2001),Adding Ajax(2007)和JavaScript Cookbook(2010)。
 
 
The animal on the cover of Learning JavaScript is a baby black, or hook-lipped,rhinoceros (Diceros bicornis). The black rhino is one of two African species of rhinos.
Weighing up to one and a half tons, it is smaller than its counterpart—the white, or square-lipped, rhinoceros. Black rhinos live in savanna grasslands, open woodlands,and mountain forests in a few small areas of southwestern, south central, and eastern Africa. They prefer to live alone and will aggressively defend their territory.
With an upper lip that tapers to a hooklike point, the black rhino is perfectly suited to pluck leaves, twigs, and buds from trees and bushes. It is able to eat coarser vegetation than other herbivores.
Black rhinos are odd-toed ungulates, meaning they have three toes on each foot.
They have thick, gray, hairless hides. Among the most distinctive of the rhino's features is its two horns, which are actually made of thickly matted hair rather than bone. The rhino uses its horns to defend itself against lions, tigers, and hyenas, or to claim a female mate. The courtship ritual is often violent, and the horns can inflict severe wounds.
After mating, the female and male rhinos have no further contact. The gestation period is 14 to 18 months, and the calves nurse for a year, though they are able to eat vegetation almost immediately after birth. The bond between a mother and her calf can last up to four years before the calf leaves its home.
In recent years, rhinos have been hunted to the point of near extinction. Scientists estimate that there may have been as many as a million black rhinos in Africa 100 years ago, a number that has dwindled to 2,400 today. All five remaining species,which include the Indian, Javan, and Sumatran rhinos, are now endangered.
Humans are considered their biggest predators.