Pkira
3/24/2016 - 9:48 AM

Javascript Get Element Functions

Javascript Get Element Functions

// by id
document.getElementById("intro")

// by tag name
document.getElementsByTagName("p")

// by class
document.getElementsByClassName("intro")

// by attribute name and value 
document.querySelectorAll("[data-foo='1']")