[javascript] Get elements by attribute when querySelectorAll is not available without using libraries?