I. The objects it knows are all figments of computer memory, but those
figments are your concern when trying to design functional, interactive
window, for example, has certain characteristics, such as size and
resize capabilities. The language knows how to make browser windows do
(which it calls properties) and capabilities (which it calls methods)
of a whole bunch of objects that have to do with browsers and the
presentation of HTML documents. Collectively, these objects make up the
Document Object Model (DOM).
The syntax for referring to properties and methods of objects may seem
series of keywords separated by periods. Here's an example:
Don't panic. That hierarchy refers to a text field contained in a form,
which is a part of the document in frame 1 of the browser window. See?
Not too hard.
you want to work with, you can go on to specify the property you want
to inspect or the method you want to employ. Let's say you want to
refer to the value property of that form element, which contains the
The property just gets tacked onto the end of the object specification.
When you refer to methods, you have to put parentheses after the
method's name. The two parentheses are there to hold parameters that
the method needs in order to do its stuff. You can sometimes leave them
empty. In other cases, they should hold numbers, strings of characters
or the URL of a needed resource that resides somewhere on the Internet.
Fun fact: There's a difference between an argument and a parameter,
even though the words frequently are used as if they were
interchangeable. Parameters are the variable -- like definitions that
appear in function declarations. Arguments are the values that are
actually sent to the function when it is called. I have to go now; Star
Trek is on.