Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook
Lesson 3: Working with objects CHAPTER 3 119 ■■click Triggered on a mouse click ■■dblclick Triggered on a mouse double-click ■■d ...
120 CHAPTER 3 Getting started with JavaScript ■■loadeddata Triggered when media data is loaded ■■loadedmetadata Triggered when m ...
Practice exercises CHAPTER 3 121 ■■The Array object has many methods. ■■The DOM represents a hierarchy of objects, forming a mod ...
122 CHAPTER 3 Getting started with JavaScript If you haven’t installed Visual Studio Express 2012 for Web, do so now. You can d ...
Practice exercises CHAPTER 3 123 FIGURE 3-19 he Web Calculator user interfaceT Switch back to Visual Studio by pressing Alt+Tab ...
124 CHAPTER 3 Getting started with JavaScript <title></title> <link rel="stylesheet" type="text/css" href="Conten ...
Practice exercises CHAPTER 3 125 <button id="btnClearEntry">CE</button><br /> <button id="btnPlus">+< ...
126 CHAPTER 3 Getting started with JavaScript Press F5 to run the test, which should fail, as shown in Figure 3-20, because you ...
Practice exercises CHAPTER 3 127 FIGURE 3-21 he passing testT Modify the test by adding a loop to test all the number buttons. ...
128 CHAPTER 3 Getting started with JavaScript Press F5 to run the test, and all 10 tests will fail. Look closely at each test t ...
Practice exercises CHAPTER 3 129 function plusClick() { txtResult.value = Number(txtResult.value) + Number(txtInput.value); } P ...
130 CHAPTER 3 Getting started with JavaScript txtInput.value = '10'; QUnit.triggerEvent(btnClearEntry, "click"); var expected = ...
Practice exercises CHAPTER 3 131 In the initialize function, add code to subscribe to btnClear and call the clear function. Add ...
132 CHAPTER 3 Getting started with JavaScript var expected = '10'; equal(txtResult.value, expected, 'Expected value: ' + expecte ...
Suggested practice exercises CHAPTER 3 133 document.getElementById('btn'+i) .addEventListener('click', numberClick, false); } tx ...
134 CHAPTER 3 Getting started with JavaScript Answers This section contains the answers to the lesson review questions in this c ...
Answers CHAPTER 3 135 C. Incorrect: Microsoft Test does not support JavaScript. D. Incorrect: NUnit does not support JavaScript. ...
...
137 Chapter 4 Getting started with CSS3 CHAPTER 4 Getting started with CSS3 Y ou’ve learned that HTML provides the structure, an ...
138 CHAPTER 4 Getting started with CSS3 the W3C started working on various modules of CSS Level 3 (CSS3). Rather than creating o ...
«
3
4
5
6
7
8
9
10
11
12
»
Free download pdf