书籍详情

JavaScript实战

JavaScript实战

作者:(美)麦克法兰 著

出版社:英伟出版社

出版时间:2009-04-01

ISBN:9787802057333

定价:¥72.00

购买这本书可以去
内容简介
  《JavaScript实战》。一个现代网站需要传递的内容不止是文字信息。网站的访客期望智能表格、导航标签、弹出式帮助,还有互动的图片浏览。《JavaScript实战》带来你正好需要的知识,用有风格而且优雅的方式来发布这些组件 —— 即使你不是一个编程高手。
作者简介
  David Pogue是《纽约时报》的技术专栏作家、畅销书作者和The Missing Manual系列图书的创始人。
目录
The Missing Credits .
  Introduction
  Part One: Getting Started with Java$cript
  
  Chapter 1: Writing Your First JavaScript Program
  Introducing Programming
  Whats 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
  A Quick Object Lesson
  Strings
  Determining the Length of a String
  Changing the Case of a String
  Searching a String: indexOf() Technique
  Extracting Part of a String with slice()
  Finding Patterns in Strings
  Creating and Using a Basic Regular Expression
  Building a Regular Expression
  Grouping Parts of a Pattern
  Useful Regular Expressions
  Matching a Pattern
  Replacing Text
  Trying Out Regular Expressions
  Numbers
  Changing a String to a Number
  Testing for Numbers
  Rounding Numbers
  Formatting Currency Values
  Creating a Random Number
  Dates and Times
  Getting the Month
  Getting the Day of the Week
  Getting the Time
  Creating a Date Other Than Today
  Tutorial
  Overview
  Writing the Function
  
  Chapter 5: Dynamically Modifying Web Pages
  Modifying Web Pages: An Overview
  Understanding the Document Object Model
  Selecting a Page Element
  Adding Content to a Page
  The Moon Quiz Revisited
  The Problem with the DOM
  Introducing JavaScript Libraries
  Getting Started with jQuery
  Selecting Page Elements (Revisited)
  Basic Selectors
  Advanced Selectors
  jQuery Filters
  Understanding jQuery Selections
  Adding Content to a Page
  Replacing and Removing Selections
  Setting and Reading Tag Attributes
  Classes
  Reading and Changing CSS Properties
  Changing Multiple CSS Properties at Once
  Reading, Setting, and Removing HTML Attributes
  Creative Headlines
  Acting on Each Element in a Seledion
  Anonymous Functions
  this and $(this)
  ……
猜您喜欢

读书导航