Loading lesson path
JavaScript
Learn how JavaScript talks to the page, the browser, forms, and user interaction.
The HTML DOM (HTML Document Object Model) is an Object Model for HTML Documents .
The DOM API (Application Programming Interface) is a set of Methods and Properties that allow JavaScript to change the content, structure, and style of any HTML elements.
Often, with JavaScript, you want to manipulate HTML elements.
The HTML DOM allows JavaScript to change both the text and the content of HTML elements.
The HTML DOM allows JavaScript to change the style of HTML elements.
HTML form validation can be done by JavaScript.
To demonstrate how to create HTML animations with JavaScript, we will use a simple web page:
HTML DOM Document
HTML events are things that happen to HTML elements.
Mouse Events happen when the user interacts with the mouse.
Keyboard Events happen when the user presses a key on the keyboard:
Load Events happen when the browser has finished loading an element.
Timing Events let you run code:
Event Management is about adding, removing, and controlling events.
A JavaScript can be executed when an event occurs, like when a user clicks on an HTML element.
The addEventListener() method attaches an event handler to the specified element.