I got two div tags. One is hardcoded, one is created on the page using
javascript.
I want the dynamically created DIV to have the same style settings
(except for two which I will change afterwards) as the static one.
I tried
staticDiv = document.GetElementById("staticdiv");
dynDiv = document.GetElementById("dyndiv");
dynDiv.style = staticDiv.style
This does not work, because the style object has a getter but not a
setter (i.e. is readonly). This is at least the case for FireFox.
I can copy the style members one by one:
dynDiv.style.width = staticDiv.style.width
and would do so if there were only four or so.
Is there any easy JavaScript way to copy all members of style?
Something like
foreach(style in dynDiv.style)....?
Thanks,
Kay