COMP 601 Study Guide - Midterm Guide: Document Object Model, Html Element, Mutator Method
Document Summary
Javascript"s interaction with html is handled through events that occur when the user or the browser manipulates a page. When the page loads, it is called an event. When the user clicks a button, that click too is an event. Other examples include events like pressing any key, closing a window, resizing a window, etc. Developers can use these events to execute javascript coded responses, which cause buttons to close windows, messages to be displayed to users, data to be validated, and virtually any other type of response imaginable. Events are a part of the document object model (dom) level 3 and every html element contains a set of events which can trigger javascript code. It executes when the user aborts loading an image. onblur. It executes when the input focus leaves the field of a text, textarea or a select option. onchange. It executes when the input focus exits the field after the user modifies its text. onclick.