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

Chapter 8. Working with Objects > Working with Object Methods

Working with Object Methods

Each one of the JavaScript objects I mentioned earlier has at least one or two methods that you can wield to make the object do something. These actions generally fall into the following categories:

  • Simulate a user's action. For example, the Form object's submit() method submits a form to the server just as though the user clicked a submit button.

  • Perform a calculation. For example, the Math object's sqrt() method calculates the square root of a number.

  • Manipulate an object. For example, the String object's toLowercase() method changes all of a string's letters to lowercase.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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