Hi Forum.... (Quelltext gaaaanz unten!!)
Ich hab mir mal ganz einfach ein Script aus Selfhmtl geklaut
http://www.teamone.de/selfhtml/tecbb.htm#a3
Funktioniert auch....
Wenn ich aber nun aus document.bgColor -> document.linkColor mache funktioniert nichts.....zumindest im NN
soweit auch in Ordnung laut....
http://www.teamone.de/selfhtml/tecbb.htm#a9
Da linkColor nur funktioniert BEVOR der Verweis deklariert wird.
Nun ist es jedoch ne Tatsache das der IE linkColor auch NACH der Deklaration des Linkes auf eben diesen anwendet.
Die linkColor wird im IE auch tatsaechlich geaendert, jedoch erst NACHDEM die for(i = 0; i < 255; ++i) Schleife verlassen wurde.
Entkommentiere ich nun die alert-Box wird die linkColor sofort angeglichen.....
Vieleicht kann mir ja jemand sagen warum... :)
Gruss
marc(..)
Quelltext:
<html><head><title>Test</title>
<script language="JavaScript">
function start() {
var X = new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
var x1 = 0, x2 = 0;
for(i = 0; i < 255; ++i)
{
//if (i % 10 ==0){alert(i);}
document.linkColor = X[x1] + X[x2] + X[x1] + X[x2] + X[x1] + X[x2];
x2 = x2 + 1;
if(x2 % 16 == 0) { x2 = 0; x1 = x1 + 1; }
}
}
</script>
</head><body link="#333399" onload="start()">
<a href="">Marc</a>
</body></html>