Introduction JavaScript / PDF


Introduction JavaScript / PDF

Introduction JavaScript / PDF






Table of Contents





1. Introduction to JavaScript
• What is JavaScript
• Uses of JavaScript
• Writing JavaScirpt

2. Programming Basics
• Variables
• Functions

3. JavaScript Objects
• Objects
• Properties
• Methods

4. Document and Window Objects
• Write to a Document
• Open a Window

5. JavaScript Events
• Events and Objects
• Image Rollovers



----------------------------




Sample of the pdf document 




1 Introduction

JavaScript Origins

JavaScript was released by Netscape and Sun Microsystems in 1995.
However, JavaScript is not the same thing as Java.

What is JavaScript:

• It is a programming language.
• It is an interpreted language.
• It is object-based programming.
• It is widely used and supported
• It is accessible to the beginner.

Uses of JavaScript

• Use it to add multimedia elements
With JavaScript you can show, hide, change, resize images, and create image rollovers. You can create scrolling text across the status bar.

• Create pages dynamically
Based on the user's choices, the date, or other external data, JavaScript can produce pages that are customized to the user.

• Interact with the user
It can do some processing of forms and can validate user input when the user submits the form.


Writing JavaScript

JavaScript code is typically embedded in the HTML, to be interpreted and run by the client's browser. Here are some tips to remember when writing JavaScript commands.

• JavaScript code is case sensitive
• White space between words and tabs are ignored
• Line breaks are ignored except within a statement
• JavaScript statements end with a semi- colon ;

The SCRIPT Tag

The

SCRIPT Example

• Open "script_tag.html" in a browser.
• View the Source
• Put the cursor after <! – Enter code below 􀃆 and enter the following:




External File

You can use the SRC attribute of the

External Example

• Open "external.html" in a browser
• View the Source
• Put the cursor after <! – Enter code here 􀃆 and enter:

• Save the changes and Refresh the browser.












Introduction JavaScript / PDF



0 commentaires: