Douglas Poston's Home Page

Course # CGS3850.591S14
Web Development: JavaScript & jQuery

JavaScript Examples

JS Introduction

My First JavaScript Example

JavaScript: Writing Into HTML Output

JavaScript: Reacting to Events

JavaScript: Changing HTML Content

JavaScript: Changing HTML Images

JavaScript: Changing HTML Styles

JavaScript: Validate Input

JS How to

The <script> Tag

JavaScript in <body>

A JavaScript Function in <head>

A JavaScript Function in <body>

External JavaScripts

JS Output

Manipulating HTML Elements

Writing to The Document Output

Warning

JS Statements

JavaScript Code

JavaScript Code Blocks

JavaScript is Case Sensitive

JS Comments

JavaScript Comments

JavaScript Multi-Line Comments

Using Comments to Prevent Execution

Using Comments at the End of a Line

JS Variables

JavaScript Data Types

Declaring (Creating) JavaScript Variables

JavaScript Arithmetic

JS Data Types

JavaScript Strings

JavaScript Numbers

JavaScript Arrays

JavaScript Objects

Undefined and Null

JS Objects

Creating JavaScript Objects

JS Functions

Calling a Function with Arguments

Calling a Function with Arguments2

Functions With a Return Value

JS Operators

JavaScript Assignment Operators Equals sign

JavaScript Assignment Operators Plus Equals

JavaScript Assignment Operators Minua Equals

JavaScript Assignment Operators Multiplication Equals

JavaScript Assignment Operators Division Equals

JavaScript Assignment Operators Percent Equals

The + Operator Used on Strings

To add a space between the two strings

or insert a space into the expression

Adding Strings and Numbers

JS Comparisons

Comparison Equal to True

Comparison Equal to False

Comparison Exactly Equal to True

Comparison Exactly Equal to False

Comparison Not Equal to True

Comparison Not Equal to Different Value True

Comparison Not Equal to Different Value False

Comparison Greater Than

Comparison Less Than

Comparison Greater Than or Equal to

Comparison Less Than or Equal to

Conditional Operator

JS Conditions

If Statement

If...else Statement

If...else if...else Statement

JS Switch

The JavaScript Switch Statement

The default Keyword

JS Loop For Loop

JavaScript Loops

The For Loop

Statement 1

Statement 3

The For/In Loop

JS Loop While Loop

The While Loop

The Do/While Loop

Comparing For and While - For

Comparing For and While - While

JS Breaks

The Break Statement

The Continue Statement

JavaScript Labels

JS Errors

Examples

The Throw Statement

JS Form Validation

JavaScript Required Fields

E-mail Validation