Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Lesson 2: Writing, testing, and debugging JavaScript CHAPTER 3 99 FIGURE 3-10 he QUnit-Metro summary screen showing the failed t ...
100 CHAPTER 3 Getting started with JavaScript FIGURE 3-11 he QUnit-Metro summary screen showing the passing testT As you add mor ...
Lesson 2: Writing, testing, and debugging JavaScript CHAPTER 3 101 Next is the beginning of an HTML comment. Notice that the bot ...
102 CHAPTER 3 Getting started with JavaScript alert(Add(3, 2)); //--> </script> <noscript>Your browser does not s ...
Lesson 2: Writing, testing, and debugging JavaScript CHAPTER 3 103 When placing your <script> elements at the bottom of th ...
104 CHAPTER 3 Getting started with JavaScript can also click the gray vertical bar (where the breakpoint is showing in Figure 3- ...
Lesson 2: Writing, testing, and debugging JavaScript CHAPTER 3 105 Normally, when you are in break mode, you see the Locals wind ...
106 CHAPTER 3 Getting started with JavaScript was set to 9 and, in the Locals window, radius is displaying a value of 9. The col ...
Lesson 2: Writing, testing, and debugging JavaScript CHAPTER 3 107 When you’re ready to run the application at full speed, you c ...
108 CHAPTER 3 Getting started with JavaScript Where should your JavaScript code be placed? A. In the element of your HTML docu ...
Lesson 3: Working with objects CHAPTER 3 109 For example, after the array is created, its size is zero, so zero is used to inser ...
110 CHAPTER 3 Getting started with JavaScript looping through the items in the array. The following example code demonstrates th ...
Lesson 3: Working with objects CHAPTER 3 111 ■■reverse Reverses the order of the items in an array and returns a reference (not ...
112 CHAPTER 3 Getting started with JavaScript different delimiter, you can use the join method and specify an alternate separato ...
Lesson 3: Working with objects CHAPTER 3 113 NodeList, so consider working with the search methods that return a live NodeList i ...
114 CHAPTER 3 Getting started with JavaScript following example, the period (.) indicates a search for a CSS class name. This ex ...
Lesson 3: Working with objects CHAPTER 3 115 FIGURE 3-18 vents captured down and bubbled up the DOM hierarchyE Subscribing to an ...
116 CHAPTER 3 Getting started with JavaScript A variation of the inline method of subscribing to an event is the traditional sub ...
Lesson 3: Working with objects CHAPTER 3 117 Working with “this” When working with events, you will frequently want to access th ...
118 CHAPTER 3 Getting started with JavaScript Form event reference The following events are triggered by actions inside an HTML ...
«
2
3
4
5
6
7
8
9
10
11
»
Free download pdf