Javascript实战

分类: 图书,计算机/网络,程序设计,Java Java Script J2EE,
作者: (美)麦克法兰著
出 版 社: 开明出版社
出版时间: 2009-4-1字数:版次: 1页数: 528印刷时间:开本: 16开印次: 1纸张:I S B N : 9787802057333包装: 平装编辑推荐
您需要了解的重要内容
开始就构建结构良好并且能和你的HTML和CSS网页协同运行的JavaScript程序。
定制你的代码——本书循序渐进的指导让你增加网页正好要调用的功能。
通过查看本书的实时在线示例开发你自己的网站解决方案。
避免常见错误——找出什么是应该避免的用法。
用预先写好的大量jQuery函数库代码来节省时间和精力。
使用基本的Ajax编程整合来自一台网络服务器或者Google地图的实时数据。
为什么创建Missing Manual系列丛书?
当内容生动、清楚和有趣时,人们能获得最佳的学习效果。不幸的是,绝大多数计算机图书读起来都像乏味的购物目录。这就是我为什么开发The Missing Manual系列图书。这一系列图书有趣,也不怕提到无用或者运行不正确的功能,而且——哦,顺便提一下——是由有实践经验的作者写成的。在书的每一页上我们都回答这个直接的问题:“这个功能有什么用处?”
DavidAPogue是《纽约时报》的技术专栏作家、畅销书作者和The MissingAManual系列图书的创始人。
内容简介
《JavaScript实战》。一个现代网站需要传递的内容不止是文字信息。网站的访客期望智能表格、导航标签、弹出式帮助,还有互动的图片浏览。《JavaScript实战》带来你正好需要的知识,用有风格而且优雅的方式来发布这些组件 —— 即使你不是一个编程高手。
目录
The Missing Credits
Introduction
Part One: Getting Started with JavaScript
Chapter 1: Writing Your First JavaScript Program
Introducing Programming
What’s a Computer Program?
How to Add JavaScript to a Page
External JavaScript Files
Your First JavaScript Program
Writing Text on a Web Page
Attaching an External JavaScript File
Tracking Down Errors
The Firefox JavaScript Console
Displaying the Internet Explorer Error Dialog Box
Accessing the Safari Error Console
Chapter 2: The Grammar of JavaScript
Statements
Commands
Types of Data
Numbers
Strings
Booleans
Variables
Creating a Variable
Using Variables
Working with Data Types and Variables
Basic Math
The Order of Operations
Combining Strings
Combining Numbers and Strings
Changing the Values in Variables
Tutorial: Using Variables to Create Messages
Tutorial: Asking for Information
Arrays
Creating an Array
Accessing Items in an Array
Adding Items to an Array
Deleting Items from an Array
Adding and Deleting with splice( )
Tutorial: Writing to a Web Page Using Arrays
Comments
When to Use Comments
Comments in this Book
Chapter 3: Adding Logic and Control to Your Programs
Making Programs React Intelligently
Conditional Statement Basics
Adding a Backup Plan
Testing More Than One Condition
More Complex Conditions
Nesting Conditional Statements
Tips for Writing Conditional Statements
Tutorial: Using Conditional Statements
Handling Repetitive Tasks with Loops
While Loops
Loops and Arrays
For Loops
Do/While Loops
Functions: Turn Useful Code Into Reusable Commands
Mini-Tutorial
Giving Information to Your Functions
Retrieving Information from Functions
Keeping Variables from Colliding
Tutorial: A Simple Quiz
Chapter 4: Working with Words, Numbers, and Dates
Chapter 5: Dynamically Modifying Web Pages
Chapter 6: Action/Reaction: Making Pages Come Alive with Events. 201
Chapter 7: Improving Your Images
Chapter 8: Improving Navigation
Chapter 9: Enhancing Web Forms
Chapter 10: Expanding Your Interface
Chapter 11: Introducing Ajax
Chapter 12: Basic Ajax Programming
Chapter 13: Troubleshooting and Debugging
Chapter 14: Going Further with JavaScript
Appendix A: JavaScript Resources
Index