HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

Chapter 14


JavaScript and AJAX


Contents


14.1 Yikes! Programming?................ 147
14.2 What can JavaScript Do?............. 147
14.3 Try It: Changing Colors.............. 148
14.4 Things To Know................... 149
14.4.1 The DOM....................... 150
14.4.2 Camel Case...................... 150
14.4.3 Where Should JavaScript Go?............ 151
14.4.4 On... Triggers..................... 151
14.4.5 Is Java the Same Thing?............... 152
14.4.6 Indexed Content................... 153
14.5 Try It: More or Less (Hide and Reveal)..... 153
14.6 Try It: Make a Function.............. 154
14.7 Try It: Change the Class of an Element..... 155

Markup, styling, and action are the three main aspects of web design.


Markup (html) is pretty easy. It is the content creation part of web design.


Styling (css) is way fun. It is the artistic part of web design.


Action is what we will talk about now. And that means JavaScript and
AJAX.


JavaScriptgives you the ability to modify a page dynamically, right on the
user’s device, without reloading the page from a server somewhere.


146
Free download pdf