Here is an excellent online book called JavaScript
Essentials, hosted by techotopia.com.
This comprehensive online book provides web developers with
everything they need to know to create rich, interactive and dynamic
web pages using JavaScript.
The purpose of this JavaScript book is to get you going with coding
JavaScript in your web pages quickly and effectively. It
provides detailed and in-depth knowledge of all aspects of JavaScript
from language basics through to advanced topics. Using this online
JavaScript book, you will learn how to develop powerful,
dynamic web pages using JavaScript. It provides you with everything you
need to use and code JavaScript. Also take a look at this site's JavaScript
FAQ, which provides many Javascript related answers to
frequently asked questions.
Table of Contents of
JavaScript Essentials:
- The History of JavaScript
- A Simple JavaScript Example
- Embedding
JavaScript into Web pages
- The <script> element
- Where to place JavaScript in a Web Page
- Introducing
JavaScript Variables
- Variable Declaration and the Assignment Operator
- JavaScript Variable Naming Conventions
- JavaScript Variable Types
- The JavaScript typeof Operator
- JavaScript Operators
- Assignment Operators
- Arithmetic Operators
- Unary Operators - Incrementing and Decrementing Variable Values
- Comparison Operators
- String Operators
- Conditional Operators
- Logical Operators
- Comments in JavaScript
- Single Line Comments
- Multi-line Comments
- JavaScript Flow
Control and Looping
- JavaScript Conditional Statements
- The JavaScript if Statement
- The JavaScript if ... else Statements
- JavaScript Looping Statements
- JavaScript for loops
- JavaScript while loops
- JavaScript do ... while loops
- JavaScript switch Statements
- Breaking a Loop
- label Statements
- Skipping Statements in Current Loop Iteration
- Understanding
JavaScript Functions
- Declaring and Calling a JavaScript Function
- Passing Arguments to a Function
- Returning a Value from a Function
- Where to Place Function Declarations
- JavaScript Object Basics
- Creating a Custom JavaScript Object
- Creating and Using Object Instances
- Extending JavaScript Objects
- JavaScript String Object
- Creating a JavaScript String Object
- JavaScript String Object Methods
- JavaScript String Object Properties
- JavaScript String Object Examples
- Getting the length of a String Object
- Setting String Object text Effects
- Performing Conversions on String Objects
- Manipulating Strings with the String Object
- JavaScript Date Object
- Understanding System Time
- Creating a JavaScript Date Object
- Setting the Time and Date of the JavaScript Date Object
- Reading the Date and Time from a JavaScript Date Object
- UTC Time
- Finding the Time Zone Offset and Getting Local Time
- JavaScript Math Object
- JavaScript Math Object Methods
- JavaScript Math Object Properties
- Using JavaScript Math Object and Properties
- Rounding and Truncating Numbers with the the Math Object
- JavaScript Window Object
- Referencing the JavaScript window Object
- JavaScript window Object Properties
- Opening Browser Windows using JavaScript
- Closing Browser Windows using JavaScript
- Moving and Resizing Windows
- Changing Window Focus
- Displaying Message Box Dialogs
- JavaScript Document Object
- What is the JavaScript Document Object?
- JavaScript Document Object Methods and Properties
- Using the JavaScript Document Object
- Writing text to a document
- Writing Text to a document in a different Window
- Changing the Document Title
- Changing the Document Colors
- Getting a List of Objects in a Document
- JavaScript Location Object
- Loading a New URL into the Current Window
- Reading the URL of the Current Window
- Extracting Parts of the URL
- JavaScript Location Object Methods
- JavaScript History Object
- JavaScript Arrays
- What is a JavaScript Array
- How to Create a JavaScript Array
- Initializing the Elements of an Array
- Accessing the Elements of a JavaScript Array
- JavaScript Array Object Methods and Properties
- JavaScript Array Sorting
- JavaScript Timeouts
- Setting up a JavaScript Timeout
- Cancelling a JavaScript Timeout
- Setting up JavaScript Timeout to Repeat
- Building Forms with
JavaScript
- The JavaScript Form Object
- Accessing Objects in a Form
- The JavaScript Text Object
- JavaScript TextArea Object
- The JavaScript Button Object
- JavaScript Check Boxes
- JavaScript Radio Buttons
- JavaScript Drop-down / Select Object
- Obtaining the Current Selection from the JavaScript Select Object
- JavaScript Password Object
- Understanding
JavaScript Cookies
- What is a JavaScript Cookie?
- The Structure of a Cookie
- Cookie Name / Value Pair
- Cookie Expiration Setting
- Cookie path Setting
- Cookie domain Setting
- Creating a Cookie
- Reading a Cookie
- Removing a Cookie
- Understanding
Cascading Style Sheets (CSS)
- What are Cascading Style Sheets for?
- Embedding CSS Styles into a Web Page
- Importing an External Style Sheet into a Web Page
- Creating CSS Rules
- Setting Styles for Individual Elements
- Setting Styles using the id Attribute of an HTML Element
- Using Classes with CSS Rules
- JavaScript
and CSS - Dynamic Styles and Layers
- Making Basic Dynamic Style Changes
- Hiding and Showing Content Using JavaScript
- Using Overlaying Layers
- Making Layers Move