Skip to content

ThreeMAC/DOM-JavaScript-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOM-JavaScript-basics

This is a quick example of how DOM can be used to manipulate HTML.

DOM is an abbreviation, and it stands for Document Object Model. This basically means your HTML is divided into elements, attributes and text. These DOM objects can be manipulated in JavaScript.

-JavaScript can change all the HTML elements in the page
-JavaScript can change all the HTML attributes in the page
-JavaScript can change all the CSS styles in the page
-JavaScript can remove existing HTML elements and attributes
-JavaScript can add new HTML elements and attributes
-JavaScript can react to all existing HTML events in the page
-JavaScript can create new HTML events in the page

If you want to learn more, check out https://www.w3schools.com/js/js_htmldom.asp

In this example I'll demonstrate how to show a list of albums in HTML through DOM in JavaScript. The main focus is the app.js file in the js directory. You can add your own albums into the array albums. There's no layout yet so feel free to play around with the CSS as well.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published