filmov
tv
#19 Starting with DOM Manipulations in JavaScript
Показать описание
DOM manipulations are when we use javascript code perform some activity on the HTML document. JS uses the DOM to access different elements on the website and perform specific tasks like - validations, changes, animations, functions etc.
HTML events are "things" that happen to HTML elements.
When JavaScript is used in HTML pages, JavaScript can "react" on these events.
getElementById() -
Definition and Usage
The getElementById() method returns the element that has the ID attribute with the specified value.
This method is one of the most common methods in the HTML DOM, and is used almost every time you want to manipulate, or get info from, an element on your document.
Returns null if no elements with the specified ID exists.
An ID should be unique within a page. However, if more than one element with the specified ID exists, the getElementById() method returns the first element in the source code.
Video by - Tanmay Sakpal
HTML events are "things" that happen to HTML elements.
When JavaScript is used in HTML pages, JavaScript can "react" on these events.
getElementById() -
Definition and Usage
The getElementById() method returns the element that has the ID attribute with the specified value.
This method is one of the most common methods in the HTML DOM, and is used almost every time you want to manipulate, or get info from, an element on your document.
Returns null if no elements with the specified ID exists.
An ID should be unique within a page. However, if more than one element with the specified ID exists, the getElementById() method returns the first element in the source code.
Video by - Tanmay Sakpal
Комментарии