This enables developers to easily write code that targets specific events. Each event has a name, like 'click' or 'scroll', and belongs to a specific object, like document (our HTML) or window (our browser window or tab). In web development, events arise from user interaction with specific browser structures - like scrolling in a browser window or clicking on an HTML element. When we write our programs to be interactive, we write our programs to react to events! An event can be triggered by a human, like a mouse click, or by something that our program creates, like an error. We were first introduced to events in the lesson called "How Web Browsers Work." In computer programming an event is any action or occurrence that software can recognize. As we'll soon learn, these are also commonly called onevent properties. In this lesson, we'll learn how to handle events with event handler properties. There are two methods of event handling that we will learn in this course section: event handler properties and event listeners. Now that we are equipped with a working understanding of the document object and how to access and manipulate HTML elements, we're going to start exploring event handling. However, these methods are not commonly used for user interaction, and as we learned they are associated with hacky websites and malware. So far, we've made our webpages interactive with window methods:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |