Hi,
I have a page with 5 div's (div1, div2, div3, div4, div5). I would like to reset style settings with a for-statement. I can't find the right syntax to do this (target the div's).
I am not so good in this sort of stuff, this is one of the things I tried:
for(i=0;i<5;i++){
if(i!=num){
["div"+i].style.background = "#ffffff";
}
}
I also tried eval for the specific part, didn't work neither.
Can somebody tell me what to change, please?
Ron
I have a page with 5 div's (div1, div2, div3, div4, div5). I would like to reset style settings with a for-statement. I can't find the right syntax to do this (target the div's).
I am not so good in this sort of stuff, this is one of the things I tried:
for(i=0;i<5;i++){
if(i!=num){
["div"+i].style.background = "#ffffff";
}
}
I also tried eval for the specific part, didn't work neither.
Can somebody tell me what to change, please?
Ron