• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Objects and Object Hierarchies > Key Built-in Object Methods

Key Built-in Object Methods

This section examines built-in object methods in some of the key objects in JavaScript. The three selected objects, window, string, and date, contain some of the most heavily used methods. As you might recall from the discussion of functions in Chapter 6, “Building and Calling Functions,” a method is essentially a function attached to an object or property of an object. In looking at the basic methods of the following objects, you should be able to cope with the bulk of methods used regularly in JavaScript.

The Window Methods

At the time of this writing, JavaScript window object has 18 cross-browser methods. Some of the methods, such as alert() and prompt(), have been used in illustrations extensively, and I will not spend time going over them again. Because the window object has so many methods, rather than attempting a large script using all of them, several smaller scripts will be used to illustrate categories of window methods.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint