Skip to content

rananhui/ShoppingList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

ShoppingList

tutorial-shopping-list

  1. Find out all the information you can about the new idea
  2. Build it.
  3. Teach it.

1. Different ways to search DOM

  • document.querySelector("#idName"); // css/sass syntax
  • document.getElementById("idName");
  • document.getElementByTagName("button");

2. Creating DOM elements and adding to page

  • document.createElement('li');
  • ul.appendChild(li);
  • document.createTextNode(inputValue)
  • div.classList.add("anotherclass");

3. Creating event listeners

  • const buttonElement = document.getElementById("addItem");
  • buttonElement.addEventListener("click", addItem);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published