Fetching html elements using CSS selectors with Javascript

Posted on 13-03-2017 by Nadir Latif


Source: https://www.w3schools.com/jsref/met_document_queryselectorall.asp

The following Javascript code fetches html elements using CSS selectors:


var x = document.querySelectorAll(".example");