ChapterÂ 6.Â Action/Reaction: Making Pages Come Alive with Events
What Are Events?
Web browsers are programmed to recognize basic actions like the page loading, someone moving a mouse, typing a key, or resizing the browser window. Each of the things that happens to a Web page is an event. To make your Web page interactive, you write programs that respond to events. In this way, you can make a <div> tag appear or disappear when a visitor clicks the mouse, a new image appear when she mouses over a link, or check the contents of a text field when she clicks a formâs Submit button.
An event ...