skip navigation
In detail

JavaScript in easy steps, 4th edition

By Mike McGrath
£10.99

Publication: February 9, 2009
Pages: 192
ISBN: 978-1-84078-362-9

 

About the book

JavaScript in easy steps instructs you how to add functionality (logic) and dynamic effects (DHTML) to web pages. It contains separate chapters on all major features of the JavaScript language. There are code examples and browser screenshots illustrating each aspect of JavaScript. This popular title is updated for Web 2.0 and includes examples showing how to develop Rich Internet Applications (RIAs) using the latest techniques employing Asynchronous JavaScript And XML (AJAX).

JavaScript in easy steps begins with a brief history of JavaScript then demonstrates how a basic script can easily be incorporated into a HTML document. The clear examples include functions working with arithmetic, date and time, random numbers, cookies, text strings and components of the document's content. There are many fun examples that you can copy to create a JavaScript clock, lottery number picker, image rollover effect, slide show and scrolling layers. You will learn how JavaScript can be used with HTML submission forms and to create Rich Internet Applications. You need have no previous knowledge of any scripting language so it's ideal for the newcomer to JavaScript. By the end of this book you will have gained a sound understanding of JavaScript and be able to add exciting dynamic scripts to your own web pages.

JavaScript in easy steps has an easy-to-follow style that will appeal to anyone who wants to add functionality to their web pages. It will appeal to programmers who want to quickly add JavaScript to their skills set, and to the student who is studying website design at school or college, and to those seeking a career in web development who need an understanding of client-side scripting.

About the author

Mike McGrath now lives in South-east Europe, on the sun-kissed shores of the Aegean Sea. Mike gained his extensive knowledge of computer languages while working as a developer contracting to companies around the world. His interests include coins of ancient Greece, dining-out with friends, and the ongoing evolution of the world wide web.

Contents

  1. See sections in chapter 1Getting started
    • Introduction
    • JavaScript keywords
    • Including inline script
    • Calling head section script
    • Embedding external script
    • Storing data in variables
    • Passing function arguments
    • Recognizing variable scope
    • Summary
  2. See sections in chapter 2Performing operations
    • Doing arithmetic
    • Assigning values
    • Comparing values
    • Assessing logic
    • Examining conditions
    • Setting precedence
    • Summary
  3. See sections in chapter 3Controlling flow
    • Branching with if
    • Branching alternatives
    • Switching alternatives
    • Looping for
    • Looping while true
    • Doing do-while loops
    • Breaking out of loops
    • Returning control
    • Summary
  4. See sections in chapter 4Employing objects
    • Creating an object
    • Extending an object
    • Creating an array object
    • Looping through elements
    • Adding array elements
    • Joining and slicing arrays
    • Sorting array elements
    • Catching exceptions
    • Summary
  5. See sections in chapter 5Telling the time
    • Getting the date
    • Extracting date components
    • Extracting time components
    • Setting the date and time
    • Summary
  6. See sections in chapter 6Working with numbers and strings
    • Calculating circle values
    • Comparing numbers
    • Rounding floating-points
    • Generating random numbers
    • Uniting strings
    • Splitting strings
    • Finding characters
    • Getting numbers from strings
    • Summary
  7. See sections in chapter 7Referencing the window object
    • Introducing the DOM
    • Inspecting window properties
    • Displaying dialog messages
    • Scrolling and moving position
    • Opening new windows
    • Making a window timer
    • Querying the browser
    • Discovering what is enabled
    • Controlling location
    • Travelling through history
    • Summary
  8. See sections in chapter 8Interacting with the document
    • Extracting document info
    • Addressing component arrays
    • Addressing components direct
    • Setting and retrieving cookies
    • Writing with JavaScript
    • Summary
  9. See sections in chapter 9Responding to user actions
    • Reacting to window events
    • Responding to button clicks
    • Acknowledging key strokes
    • Recognizing mouse moves
    • Identifying focus
    • Summary
  10. See sections in chapter 10Processing HTML forms
    • Assigning values
    • Polling radios & checkboxes
    • Choosing options
    • Reacting to form changes
    • Submitting valid forms
    • Summary
  11. See sections in chapter 11Creating dynamic effects
    • Swapping backgrounds
    • Toggling visibility
    • Rotating image source
    • Enlarging thumbnails
    • Animating elements
    • Summary
  12. See sections in chapter 12Producing web applications
    • Introducing AJAX
    • Sending a HTTP request
    • Using response text
    • Using XML response data
    • Creating a web application
    • Programming the application
    • Running the web application
    • Summary

Downloads

Win a Google Consultant for a Day

Lost?

Our site map can help you find the page you need.