Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js querySelectorAll

// https://www.google.com/
// this puts a border around the 'a' tags of 'Google offered in' section.

// within this id find all the 'a' tags
var languages = document.querySelectorAll("#SIvCob a");


// loop through all the a tags a add a border to the tags
for(var i = 0; i < languages.length; i++){
    document.querySelectorAll("#SIvCob a")[i].style.border = "1px solid black";

}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #querySelectorAll
ADD COMMENT
Topic
Name
9+4 =