I am trying to use the ID through the loop, but error:
document.getElementById(firstN)has no properties
count = 5; //5 is set up temporary
for (i=0; i<5; i++) {
firstN = 'firstN'+i;
firstN = 'secondN'+i;
document.getElementById(firstN).innerHTML = txt[2];
document.getElementById(secondN).innerHTML = txt[1];
}
document.getElementById(firstN)has no properties
count = 5; //5 is set up temporary
for (i=0; i<5; i++) {
firstN = 'firstN'+i;
firstN = 'secondN'+i;
document.getElementById(firstN).innerHTML = txt[2];
document.getElementById(secondN).innerHTML = txt[1];
}