skip navigation
In detail

JavaScript in easy steps, 3rd edition

By Mike McGrath
£10.99

Publication: April 26, 2006
Pages: 192
ISBN: 978-1-84078-315-5

 

About the book

JavaScript in easy steps instructs the reader 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 the Document Object Model used by modern browsers 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 by examining the 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 & time, random numbers, cookies, text strings and components of the document's content. There are many fun examples which the reader can copy to create a JavaScript clock, lottery number picker, image rollover effect, slide show and scrolling layers. The book also shows how JavaScript can be used with HTML submission forms and to create Rich Internet Applications. You don't need any 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 1Introducing JavaScript
    • Introduction
    • Including JavaScript in HTML
    • Hello World
    • Syntax rules
    • Keywords
    • Variables
    • Data types
    • Escape sequences
    • Functions
    • Function arguments
    • Variable scope
    • Summary
  2. See sections in chapter 2Performing operations
    • Arithmetical operators
    • Logical operators
    • Assignment operators
    • Comparison operators
    • Conditional operator
    • Summary
  3. See sections in chapter 3Making statements
    • Conditional if
    • If-prompt statement
    • If-else statement
    • Switch statement
    • For loops
    • The for-in loop
    • While loops
    • The do-while loop
    • Break statement
    • Continue statement
    • Summary
  4. See sections in chapter 4Using arrays
    • Creating an array
    • Looping to fill elements
    • Adding more elements
    • Joining elements together
    • Reversing element order
    • Slicing elements into pieces
    • Sorting elements sequentially
    • Summary
  5. See sections in chapter 5Telling the time
    • Getting the date and time
    • Extracting date components
    • Extracting time components
    • Calculating elapsed time
    • Utilizing universal time
    • Recognizing time zones
    • Setting the date and time
    • Creating date strings
    • Making a system timer
    • Summary
  6. See sections in chapter 6Doing mathematics
    • Math constants
    • Math methods
    • Comparing numbers
    • Rounding floats
    • Generating random numbers
    • Summary
  7. See sections in chapter 7Working with strings
    • Calculating string length
    • Joining strings together
    • Finding a character
    • Changing case
    • Splitting strings apart
    • Creating substrings
    • Converting to strings
    • Discovering Unicode values
    • Extracting string numbers
    • Inserting variables in strings
    • Summary
  8. See sections in chapter 8Understanding objects
    • Constructing objects
    • Inheriting object features
    • Querying the browser
    • Discovering what is enabled
    • Summary
  9. See sections in chapter 9Exploring the window object
    • Controlling location
    • Getting monitor settings
    • Recognizing frames
    • Addressing frames
    • Advising status messages
    • Scrolling and moving
    • Seeking confirmation
    • Prompting for input
    • Opening new windows
    • Summary
  10. See sections in chapter 10Discovering the document object
    • Addressing array components
    • Addressing elements directly
    • Using cookies
    • Writing with JavaScript
    • Extracting document info
    • Creating new components
    • Summary
  11. See sections in chapter 11Handling events
    • Reacting to window events
    • Responding to clicks
    • Ackowledging key actions
    • Recognizing mouse moves
    • Identifying focus and size
    • Summary
  12. See sections in chapter 12Interacting with forms
    • Setting form attributes
    • Assigning text values
    • Polling radio buttons
    • Polling checkboxes
    • Choosing options
    • Reacting to changes
    • Submitting forms
    • Aborting image downloads
    • Summary
  13. See sections in chapter 13Creating dynamic effects
    • Introducing the DOM
    • Using the javascript: protocol
    • Manipulating style attributes
    • Toggling visibility
    • Inserting content
    • Producing a slide show
    • Tacking layers
    • Summary
  14. See sections in chapter 14Producing rich internet applications
    • Introducing AJAX
    • Making an HTTP request
    • Using response text
    • Using XML response data
    • Creating an RIA
    • Programming the RIA
    • Executing the RIA
    • Summary

Downloads

Win a Google Consultant for a Day

Lost?

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