Call More Than One Function With a Single Event Handler

It is possible to call two different functions when only a single event has occurred; for example, when the user has clicked on a particular button, or when your page initially loads. To do that, make sure to place a semicolon between the two function calls. At load time, for example, you might want to call an init() function to initialize variables, and a setHidden() function to set the visibility of certain objects. To do that, place a semicolon between the two function calls, as in:

 
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: