JavaScript - Find matching elements

javascript-dom

document.getElementById
document.getElementByTagName
document.getElementByClassName

document.querySelector(selectors);
var el = document.querySelector(".myclass");
var el = document.querySelector("div.user-panel.main input[name=login]");

elementList = document.querySelectorAll(selectors);
var matches = document.querySelectorAll("div.note, div.alert");
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License