Description

JavaScript is one of the easiest, most straightforward ways to enhance a Web site with interactivity.

Sams Teach Yourself JavaScript in 24 Hours serves as an easy-to-understand tutorial on both scripting basics and JavaScript itself. The book is written in a clear and personable style with an extensive use of practical, complete examples.

The Third Edition of Sams Teach Yourself JavaScript in 24 Hours includes material on the latest developments in JavaScript and Web scripting.

Readers will learn how to use JavaScript to enhance Web pages with interactive forms, objects, and cookies. They will also discover how to use JavaScript to work with games, animation, and multimedia.

Tools for Scripting. What Time is It? Beginning the Script. Adding JavaScript Statements. Creating Output. Adding the Script to a Web Page. Testing the Script. Workshop: Hiding Scripts from Older Browsers.

Using String Objects. Working with Substrings. Using Numeric Arrays. Using String Arrays. Sorting a Numeric Array. Workshop: Displaying a Scrolling Message.

Hour 6. Testing and Comparing Values.

The if Statement. Using Shorthand Conditional Expressions. Using Multiple Conditions with switch. Workshop: Evaluating a User Response.

Hour 7. Repeating Yourself: Using Loops. Using for Loops. Using while Loops. Using do…while Loops. Working with Loops. Using for…in loops. Workshop: Working with Arrays and Loops.Hour 8. Using Math and Date Functions.

What Is an Object? The Math Object. Working with Dates. Workshop: Working with the Math Object.

III. THE DOCUMENT OBJECT MODEL (DOM).

Hour 9. Working with the Document Object Model.

Understanding the Document Object Model. Using window Objects. Working with Web Documents. Accessing Browser History. Working with the location Object. Reading Information about the Browser. Workshop: Creating Back and Forward Buttons.

Hour 10. Responding to Events.

Understanding Event Handlers. Using Mouse Events. Using Keyboard Events. Using the onLoad and onUnload Events. Workshop: Adding Link Descriptions to a Web Page.