Week4day3 JavaScript Events
HTML events - events that trigger actions in a browser Onevents- a type of HTML event that trigger a response to an action like onclink Eventlistner - a function that detects and responds to events in a program or application
The user selects, clicks, or hovers the cursor over a certain element. The user presses a key on the keyboard. The user resizes or closes the browser window. A web page finishes loading. A form is submitted. A video is played, paused, or ends. An error occurs.
focus and blur β The color changes when the button is focused and unfocused; try pressing the tab to focus on the button and press the tab again to focus away from the button. These are often used to display information about filling in form fields when they are focused, or to display an error message if a form field is filled with an incorrect value. dblclick β The color changes only when the button is double-clicked. mouseover and mouseout β The color changes when the mouse pointer hovers over the button, or when the pointer moves off the button, respectively.