I tried this question but no luck. Probably because I ask not so. Any help is greatly appreciated.
I have variables copy1, copy2etc. I want to iterate over them and select each of them to check if this content contains a certain number of characters. When I use any changes below, it will either hide the error or display a line in the console.
var copy1 = document.getElementById('copy1');
var copy2 = document.getElementById('copy2');
var copy3 = document.getElementById('copy3');
for(var i=0;i<4;i++){
console.log(copy+i);
console.log("copy"+i);
};
Ideally, I would be able to select an element and style that are using javascript.
Great value Thank you all.
Mo
source
share