document.querySelectorall.[iD] code example
Example 1: js queryselectorall
var matches = document.querySelectorAll("p");
Example 2: javascript querySelectorAll id ends with
console.log(document.querySelectorAll("[id$=foo]"));
var matches = document.querySelectorAll("p");
console.log(document.querySelectorAll("[id$=foo]"));