![]() |
Object![]() ![]() ![]() ![]() ![]()
An object is a software model typically used to represent a real world object along with a set of behaviours or circumstances. In JavaScript, built in objects can also represent the structure, action, and state of an HTML page. In Object Oriented Terminology, the actions are called as methods, and states are called as properties.
To build an object you must know something it. Let us take a squirrel as an example. A squirrel has several physical properties, including gender, age, size, and colour. It also has properties relating to its activities, such as running, jumping, eating peanuts. It's methods relate to change in behaviour or state, such as run away, stop and look or chatter. Creation of an object involves two steps:
1. defining functions that outlines the object
<SCRIPT Ianguage= "javascript"> function squirrel(color) The first part of the script with the function tag outlines the in itial state for any given squirrel. It accepts one parameter, called color, that becomes a parameter. By itself the function does nothing it must be invoked and assigned to a variable. That is why we created an object called groundSquirrel with the blue colour ' The color is accessed by joining the object name with the property name: groundSquirrel.color
|
|
Domain NamesDHTML Document Object Model Features of Dynamic HTML HTML Versus DHTML Netscape's Vision of DHTML Microsoft Vision of DHTML Cascading Style Sheets(CSS) Inline Style Sheets Embedded Style for a Page Linked Cascading Style Sheet Text Specific Style AttributesCSS Attributes Assigning Classes Java Script Style Sheets(JSSS) Object Property Functions Methods
Creating Style Sheets with JSSS New JSSS Methods Working Layers Positioning the Layer Using More than One Layer Moving a Layer Around on the Page Events
The mouseOver and mouseOut Events The mouseMove Event The Keyboard Events The mouseDown and mouseUp Events The dragDrop Event Error Event Form Event The Script Tag Changing Text Color Inline Text Attribute Changes Text Dynamically Changing StylesExample of Dynamically Changing Style Dynamically Changing Content HTML Replacement Changing Text Content An Example of HTML Graphics ReplacementWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |