IPOWERWEB.com

 Affordable, reliable
web hosting solutions

Call IPOWERWEB Today at 1-888-511-HOST Chat with an IPOWERWEB representative LIVE!
24/7x365 service - Live Technical Support

Domain Name Registration
web hosting services
cheap web hosting
IPOWERWEB help section
contact IPOWERWEB
testimonials for best hosting
affordable web hosting
IPOWERWEB web hosting
IPOWERWEB accolades
best domain prices


Web Hosting Money Back Guarantee
home build profit promote manage


Javascript Tutorial

Home > Build > Programming > Javascript > Javascript Tutorial

by Boris Mordkovich

INTRODUCTION

As I got farther into web development I wanted to go beyond the limitations of HTML. HTML cannot make decisions, be very interactive, or store information. Javascript was the answer. It was developed by Netscape and was originally called LiveScript. The name was later changed to show the relation to Java. Now it is supported by both of the most popular browsers, Microsoft Internet Explorer and Netscape Navigator.

Note: Parts of this tutorial assume you know HTML. If you do not, consider reading this tutorial on HTML first. This tutorial is lengthy but very thorough.

CONTENTS

Part 1 - Defining a Script
Part 2 - Creating a Simple Script
Part 3 - Variables, Strings, and Arrays

Part 4 - Testing and Comparing Variables
Part 5 - Loops and Functions
Part 6 - Objects
Part 7 - Events

There are 3 places you can define a script.

  1. The first place you can define a script is within the head of the HTML document. Scripts here aren't automatically executed when the page loads but can be referred to by other scripts within the document.
  2. The next place you can define a script is within the body of the HTML document. Scripts here are executed as the page loads.
  3. The last place you can define a script is within an event handler. You will learn more about these later.

When defining scripts in the head and body of HTML documents you are required to use a script tag, while if you are defining a script within an event handler, this tag is not required.

You can include the src attribute to the script tag if you would like to save your script to an external file and include it in the HTML file. Remember to use the .js extension when saving Javascript to an external file.
     <script src="menu.js">
The above would include the Javascript from the menu.js file.

 
home | products | about us | help center | testimonials | press room | contact us
affiliates | careers | domain names | web hosting | site map

Copyright © 1999-2007 IPOWER, Inc. Read our Terms and Conditions. All rights reserved.