- Object:
- An object is a thing - a check box on a form, the form itself, an image, a document, a link, or even the browser window. Some objects are built into JavaScript and are not necessrily part of your Web page. For example, the Date object provides a wide range of date information. You can think of objects as the nouns in the JavaScript language.
- Property:
- A property describes an object. Properties can be anything from the color to the number of items, such as radio buttons, within an object. When visitors select an item in a form, they change the form's properties. You can think of properties as the adjectives in the JavaScript language.
- Method:
- A method is an instruction. The methods available for each object describe what you can do with the object. For example, using a method, you can convert text in an object to all uppercase or all lowercase letters. Every object has a collection of methods, and every method belongs to at least one object. You can think of methods as the verbs in the JavaScript language.
- Statement:
- Statements combine the objects, properties, and methods (nouns, adjectives, and verbs). A statement is a JavaScript language sentence.
- Function:
- A function is a collection of statements that perform actions. Functions contain one or more statements and thus can be considered the paragraphs of the JavaScript language.
- Event:
- An event occurs when something happens on your page, such as a visitor submitting a form or moving the mouse cursor over an object.
- Event Handler:
- An event handler waits for something to happen - such as the mouse moving over a link - and then launches a script based on that event. For example, the
onMouseOver event handler performs an action when the visitor moves the mouse pointer over the object. You can think of an event handler as posing questions or directing the action of a story.
|