Simply Javascript: Everyting You Need To Learn Javascript From Scratch (häftad)
Fler böcker inom
Häftad (Paperback)
Antal sidor
229 x 178 x 25 mm
820 g
Antal komponenter
Simply Javascript: Everyting You Need To Learn Javascript From Scratch (häftad)

Simply Javascript: Everyting You Need To Learn Javascript From Scratch

Using the Dom

Häftad Engelska, 2007-07-01


Everything you need to learn JavaScript from Scratch!

Packed with full-color examples, "Simply JavaScript" is a step-by-step introduction to programming in JavaScript the right way. Learn how easy it is to use JavaScript to solve real-world problems, build smarter forms, track user events (such as mouse clicks and key strokes), and design eye-catching animations. Then move into more powerful techniques using the DOM and Ajax. Learn JavaScript's built-in functions, methods, and properties. Easily integrate JavaScript in your web site. Use JavaScript to validate form entries and interact with your users. Understand how to respond to user events. Create animations that bring your web site to life. Start programming using the DOM and Ajax.

Unlike other JavaScript books, modern best practices such as progressive enhancement, accessibility and unobtrusive scripting are used from the very beginning. All the code in the book is also cross-browser compatible and downloadable for free, so you can get started instantly!
Visa hela texten


Har du läst boken? Sätt ditt betyg »

Fler böcker av författarna

Övrig information

<p>Kevin Yank is a world-renowned leader in web development. When not writing best sellers, Kevin is the Technical Director of and editor of the popular SitePoint Tech Times newsletter.<p>Cameron Adams is an author of multiple web development books and is often referred to as a "Web Technologist." In addition to his extensive JavaScript experience, Cameron's passions extend to CSS, PHP, and graphic design.


0. Preface

* Who Should Read this Book?

* Whats Covered in this Book?

* The Books Web Site

o The Code Archive

o Updates and Errata

* The SitePoint Forums

* The SitePoint Newsletters

* Your Feedback

* Acknowledgments

o Kevin Yank

o Cameron Adams

* Conventions Used in this Book

o Code Samples

o Tips, Notes, and Warnings

1. 1. The Three Layers of the Web

* Keep em Separated

* Three Layers

o HTML for Content

o CSS for Presentation

o JavaScript for Behavior

* The Right Way

* JavaScript Libraries

* Lets Get Started!

2. 2. Programming with JavaScript

* Running a JavaScript Program

* Statements: Bite-sized Chunks for your Browser

* Comments: Bite-sized Chunks Just for You

* Variables: Storing Data for your Program

o Variable Types: Different Types for Different Data

* Conditions and Loops: Controlling Program Flow

o Conditions: Making Decisions

o Loops: Minimizing Repetition

* Functions: Writing Code for Later

o Arguments: Passing Data to a Function

o Return Statements: Outputting Data from a Function

o Scope: Keeping your Variables Separate

* Objects

* Unobtrusive Scripting in the Real World

* Summary

3. 3. Document Access

* The Document Object Model: Mapping your HTML

o Text Nodes

o Attribute Nodes

* Accessing the Nodes you Want

o Finding an Element by ID

o Finding Elements by Tag Name

o Finding Elements by Class Name

o Navigating the DOM Tree

o Interacting with Attributes

* Changing Styles

o Changing Styles with Class

* Example: Making Stripy Tables

o Finding All Tables with Class dataTable

o Getting the Table Rows for Each Table

o Adding the Class alt to Every Second Row

o Putting it All Together

* Exploring Libraries

o Prototype

o jQuery

o Dojo

* Summary

4. 4. Events

* An Eventful History

* Event Handlers

o Default Actions

o The this Keyword