A for cicle, that should perform a class change, if I force the value with a string this works, passing the value with a variable not work, why this is happening?
for (var i = 0; i < A.length; i++) {
var AA ="FFF"+i;
document.getElementById(AA).className = this.off;
\\ document.getElementById("FFF1").className = this.off;
alert(AA);
}
the for should replace the number after FFF but it doesn't happen
You have the wrong ID when do this
var AA ="FFF"+i;
. Because for example "FFF" + 0 = "FFF0".