Site hosted by Angelfire.com: Build your free website today!
Website Help

| HTML | CSS | JavaScript |

Soon to come:
XHTML, XML, ASP,
Home

JS Basics

JS Home
Introduction
Basics
Operators
Functions
Conditional
Looping

JS References

String Object
Array Object
Date Object
Math Object
Window Object
Frame Object
Form Object
Browser Object

JavaScript Introduction

Javascript was developed by Netscape

Things you should know...

  • HTML and some basics about the WWW

Stuff about Javascript that YOU will memorize

  • JavaScript is NOT Java
  • JavaScript is added to web pages to make it more interactive
  • Javascript is normally imbedded into HTML directly
  • JavaScript is a scripting language, scripting language is lightweight programming language
  • JavaScript is an interpreted language, meaning it is executed without compilation
  • JavaScript is environmentally dependent, meaning that the software runs the JavaScript code
  • Javascript is an Object-Based Language
  • JavaScript is suported by all major browsers such as Internet Explorer and Netscape
  • Statements may end in semicolon's, ; , however it is optional though many programmers still carry the habit from C++ or Java

How to embed javascript into HTML

Javascript can be embedded onto anywhere in your HTML document, to do this, simply surround your script with the <script type="text/javascript">...</script> tags. The type attribute is to define how the following script will be read.

Usually JavaScript is present in 2 places, one is the head section of the HTML document, the other is the body section of the document, however you can link to external JavaScript file by adding the src="..." attribute in your oppening section of your <script> tag. Here's a demostration:

   <html>
   <head>
    <title>Demo</title>
    <script src="thejavascript.js" type="text/javascript">
    [statements]
    </script>
   </head>
   <body>
    <script type="text/javascript">
    [statements]
    </script>
   </body>
   </html>
   
fastadvert.com


fastadvert.com - make money with your website