Answers for "getElementsByClassName.onclick doesn't work"

0

getElementsByClassName.onclick doesn't work

for(let p of document.getElementsByClassName('class1')){
		p.onclick = function(){
			//...
		}
}
Posted by: Guest on March-24-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language