G
Guest
Hi, I hope someone can help me with what is probably quite an easy
question!
I need to store a string in a variable, and then use that variable to
refer to a table row. For example:
var row = 'row10';
[row].style.backgroundcolor='white';
My row is defined as:
<tr id='row10'>
If I use "row10.style.backgroundcolor='white' then it works, but if I
use the variable then it doesn't. I have tried it with and without
square brackets. What I am I doing wrong?
Thanks
Mark
question!
I need to store a string in a variable, and then use that variable to
refer to a table row. For example:
var row = 'row10';
[row].style.backgroundcolor='white';
My row is defined as:
<tr id='row10'>
If I use "row10.style.backgroundcolor='white' then it works, but if I
use the variable then it doesn't. I have tried it with and without
square brackets. What I am I doing wrong?
Thanks
Mark