Skip to content

radwan503/Practice--JavaScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Details About Projet

1.querySelectorAll()-> HTML DOM querySelector() Method To return all the matches, use the querySelectorAll() method instead. If the selector matches an ID in document that is used several times (Note that an "id" should be unique within a page and should not be used more than once), it returns the first matching element.

2.dataset-> The dataset property on the HTMLElement interface provides read/write access to all the custom data attributes (data-*) set on the element. This access is available both in HTML and within the DOM. It is a map of DOMString, one entry for each custom data attribute. Note that the dataset property itself can be read, but not directly written. Instead, all writes must be to the individual properties within the dataset, which in turn represent the data attributes. Note also that an HTML data-attribute and its corresponding DOM dataset.property do not share the same name,but they are always similar.

3.documentElement-> The documentElement property is used to return the documentElement as an Element Object. It is read-only property. ... Return Value: It returns the documentElement of the document or an element object.

4.forEach()-> forEach is an Array method that we can use to execute a function on each element in an array. It can only be used on Arrays, Maps, and Sets. When using forEach , we simply have to specify a callback function.

5.addEventListener()-> The addEventListener() method makes it easier to control how the event reacts to bubbling. When using the addEventListener() method, the JavaScript is separated from the HTML markup, for better readability and allows you to add event listeners even when you do not control the HTML markup.