the book of javascript 2nd edition phần 1 pptx

50 401 0
the book of javascript 2nd edition phần 1 pptx

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

[...]... 12 9 Going Off the Deep End 13 0 Using array.length in Your Loop 13 1 An Incremental Shortcut 13 1 Beware of Infinite Loops 13 1 for Loops 13 2 How AntWeb Checks Off All the Checkboxes 13 3 Line-by-Line Analysis of Figure 8 -11 13 3 Creating Your Own Arrays 13 4 Line-by-Line Analysis of Figure 8 -12 13 5 How the Book of JavaScript. .. Elements 10 9 Reading Information from Text Fields 10 9 Setting the Value of a Text Field 11 0 Textareas 11 1 Checkboxes 11 2 Radio Buttons 11 4 Pull-Down Menus and Scrollable Lists 11 5 Handling Events Using Form Elements 11 6 Make this a Shortcut 11 7 Using Pull-Down Menus as Navigational Tools 11 8 One Last Forms... lists all of the objects and functions that comprise JavaScript Appendix D: Chapter 15 ’s Italian Translator and Chapter 17 ’s To Do List Application The last appendix gives a couple of the book s longest code examples in their entirety Companion Website The Book of JavaScript website (http://www.bookofjavascript.com) contains the code examples from each chapter, archived copies of many of the websites... Constants 16 0 A Timed Slide Show 16 1 Line-by-Line Analysis of Figure 9 -11 16 2 A Safer Version of rotateImage() 16 3 Why Declaring a Variable Outside a Function Is Unsafe 16 3 Why You Can’t Put var Inside a Timing Loop 16 3 The Solution 16 4 The Hitch 16 5 The Solution to the Hitch 16 5 Why image_array Is Declared Outside the rotateImage()... taken by someone viewing the page Although Taylor’s demo is beautiful, it’s not the most practical application of JavaScript Figure 1- 2 (available at http://www.bookofjavascript.com/ Chapter 01/ Fig 01- 02.html) shows you a much more practical use of JavaScript that calculates the weight of a fish based on its length Enter the length and type of fish, and the JavaScript calculates the fish’s weight This... browse to http://www.bookofjavascript.com/Chapter 01/ Fig 01- 01. html), created by a fellow named Taylor way back in 19 96 Flashy, isn’t it? In this example, a JavaScript function changes the color of a randomly chosen square in the grid every second or so Figure 1- 1: A demonstration of JavaScript s artful abilities W e l co me t o Jav aS c r i p t ! 3 Mousing over one of the five icons below the squares (number,... HTML (including JavaScript) and images for many of the websites discussed in the book xxx I n t r o d u c ti o n WELCOME TO JAVASCRIPT! Welcome to The Book of JavaScript JavaScript is one of the fastest and easiest ways to make your website truly dynamic— that is, interactive If you want to spruce up tired-looking pages, you’ve got the right book This book will give you some ready-made JavaScripts you... Line-by-Line Analysis of Figure 11 -11 210 Summary 213 Assignment 214 12 S A V IN G V I S IT O R I N F O RM A TI O N W I TH C O O K IE S 215 A Real-World Example of Cookies 216 What Are Cookies? 216 What Cookies Can and Can’t Do 217 Working with Cookies 218 Setting Cookies 218 Reading Cookies 218 Resetting Cookies... Function 16 6 Summary 16 7 Assignment 16 7 10 U S IN G FR A M E S A N D I M A G E M A P S 16 9 A Real-World Example of Frames and Image Maps 17 0 Frames 17 0 Frame Basics 17 0 Frames and JavaScript 17 2 Frames and Image Swaps 17 4 Changing the Contents of Two Frames at Once 17 6 Frames Inside Frames 17 7 JavaScript. .. 13 6 Checking for Blank Statements 13 7 Checking the Last Element in the Array 13 7 xii C on t e n t s i n D e t a i l Testing the Limits of Arrays 13 7 The startScroll() Function 13 8 A Streamlined Version 13 9 Loops Can Nest 14 0 Creating Arrays As You Go Along 14 0 Associative Arrays 14 2 Line-by-Line Analysis of Figure 8 -18 . Shortcut 13 1 Beware of Infinite Loops 13 1 for Loops 13 2 How AntWeb Checks Off All the Checkboxes 13 3 Line-by-Line Analysis of Figure 8 -11 13 3 Creating Your Own Arrays 13 4 Line-by-Line Analysis of Figure. 8 -12 13 5 How the Book of JavaScript Tip Box Works 13 6 Checking for Blank Statements 13 7 Checking the Last Element in the Array 13 7 Contents in Detail xiii Testing the Limits of Arrays 13 7 The. Analysis of Figure 11 -11 210 Summary 213 Assignment 214 12 SAVING VISITOR INFORMATION WITH COOKIES 215 A Real-World Example of Cookies 216 What Are Cookies? 216 What Cookies Can and Can’t Do 217 Working

Ngày đăng: 06/08/2014, 09:20

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan