JAVASCRIPT DOM SELECTORS

  • querySelector()
  • querySelectorAll()
  • getElementsByTagName()
  • getElementsByClassName()
  • getElementById()

QuerySelector()

document.querySelector(“#www-wikipedia-org”);

QuerySelectorAll()

document.querySelectorAll(“#www-wikipedia-org”);

GetElementsByTagName()

document.getElementsByTagName(“DIV”)[0];

GetElementsByClassName()

 getElementsByClassName(“lang-list-button-wrapper”);

GetElementById()

 document.getElementById(“task”);

Overview

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store