Menu
Hi all
How can I change an object’s property when the property name itself is dynamic? i.e.
var prop = ‘backgroundColor’;
eval(‘document.getElementById(‘obj’).style.’+prop) = aVar;
…but it won’t write the new property. It will, however, READ the existing value of the property from the object.
Any ideas? Ta.