There are many terms that you will have to learn when
before you do any scripting. It is easier to learn the terms as you go along,
as this will give you a greater understanding of them. So, we will not be
throwing terms out there to confuse or frighten you. However, there are terms
that you will need to know - and will come to know - and they need to be
noted before you can go any further.
in terms of objects. DOM, which stands for Document Object Model is the
know what an object is. It's a thing. Your computer is an object. Your desk
is an object. Let's look into the computer screen, and you will see other
objects. A browser window is an object. A web page is a document, and a document
is an object. A graphic on a web page is an object.
As you can see, many objects contain other objects. For instance, the desk
contains the computer, which contains the web browser window, which contains
the web page, which contains the graphics.
Now, each object has properties. For instance, a web page has a background
color, and it uses a certain font. These are properties. But, the background
color could also be considered an object, with the property being the actual
color. Don't feel confused. For now, all you need to know is that there are
objects and objects have properties.
called methods. These methods may be referred to as functions. Functions
are methods that you set up to perform a certain task. Method and Function
are pretty much interchangeable in this way.
also have events, and event handlers. An event is something that happens.
visitor did, such as moving their mouse over a link. That is an event. An
event handler comes into play when the event occurs. The event occurs and
You will learn some other important terms as you go along. Remember, you
don't have to cram all of this into your head right now. These are the basic
forward in this tutorial.
Open your NotePad or favorite text editor, and let's
write something to your HTML document. Within your text editor, write or
copy and paste the following script:
This script will write the words, HI Everybody on your
webpage. Now, this is a very simple script, and you can use HTML to write
words on your page, but the basis of this script will be very important later
on, so it is important to learn this one. Let's look at each element of the
First, we are telling the web browser that it is about to see and interpret
This is an important tag. The browser needs to know what
it is about to see. The next part is really important as well. You see, not
that should be printed on a page, as it is. You have to prevent this from
using HTML comment tags, as seen below:
older browsers will ignore it, but newer browsers will see it for what it
The next part of our script is:
The document is an object. We discussed this earlier,
remember? Write is the method (or function) that we want to use on the document.
It is presented with a period between the two words: document.write. The
write method is actually presented as write() with what you want written
inside the parentheses.
therefore enclosed in quotation marks. It is presented as this:
Note that we have also added a little HTML into the mix
with the use of tags that will force the text to be printed in italics. We've
written the object, the method, and the string so that now the script has
everything it needs to run. We've also closed or ended the comment, and then
the script with the following:
and it is the basis for so many other wonderful things that can be done with
it up to your web server so you can see how it works.
As stated in the previous lesson, if a user's browser
but it is possible that the user will get error reports. This can be prevented
So far, you have learned about objects, methods, and
The Basics of
Variables and Arrays
Functions and Methods
Math Object Reference
Date Object Reference
Web Development Tutorials
Sheets Tutorial: An Introduction to Cascading Style Sheets
Development: A step by step guide to developing a successful Internet
Codes Chart: Copy and paste HTML codes for your web page
Copy and paste special effect HTML codes for your web page
Tips: Tips, tricks, and special effect codes for your web page
Web Safe Color Chart: Hexadecimal and RGB Color Codes for your web page
Codes Chart: American Standard Code for Information
Interchange character codes chart