I have a lot of labels
I created on a php page, they all have an id like
<label id="1_p">
<label id="2_p">
<label id="3_p">
<label id="4_p">
<label id="5_p">
...
I have to change their color to #D8D8D8
and I thought to do it using a for loop:
for(i=1;i<13;++i) {
document.getElementById(i+'_p').style.color='#D8D8D8';
}
By the way Firefox tells me that document.getElementById(...) is null. Any suggestion?