Hi,
Sorry, ich hatte die beim Testen uebrig gebliebenen redundanten Parts nicht vereinigt. So ist es dann kompakter:
ah, okay, danke :-) Darf ich noch folgende Optimierung vorschlagen:
var styles = (document.defaultView ...) ? ...getComputedStyle(d, null)
: (d.currentStyle) ? d.currentStyle
: return;
for (var p in styles) ...
var d,styles,p;
(Nebenbei: Ich bevorzuge es, Variablen erst in ihrem benötigten Kontext zu deklarieren, d.h. in der Regel auch umgehend zu initialisieren.)
Cheatah
--
X-Self-Code: sh:( fo:} ch:~ rl:° br:> n4:& ie:% mo:) va:) de:] zu:) fl:{ ss:) ls:~ js:|
X-Self-Code-Url: http://emmanuel.dammerer.at/selfcode.html
X-Will-Answer-Email: No
X-Please-Search-Archive-First: Absolutely Yes
X-Self-Code: sh:( fo:} ch:~ rl:° br:> n4:& ie:% mo:) va:) de:] zu:) fl:{ ss:) ls:~ js:|
X-Self-Code-Url: http://emmanuel.dammerer.at/selfcode.html
X-Will-Answer-Email: No
X-Please-Search-Archive-First: Absolutely Yes