|
|
ilch Text Manager
| Menü: zurück zum Hauptmenü / Codeschnipsel eintragen / zurück
|
| Text wird am Ende dunkel |
| Code | 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45:
|
<Center>
<SCRIPT LANGUAGE="JavaScript">
<!-- ... Quelle Beispiel ...
// Farbspiel
function HexArray(n)
{
this.length = n
for(i = 0; i < 10; i++)
this[i] = i
this[10] = "A"
this[11] = "B"
this[12] = "C"
this[13] = "D"
this[14] = "E"
this[15] = "F"
return(this)
}
hex = new HexArray()
function DezNachHex(x)
{
var high = Math.floor(x / 16)
var low = Math.floor(x - high * 16)
return(hex[high] + "" + hex[low])
}
function Farbspiel(text)
{
for(i = 0; i < text.length; i++)
{
FarbwertRot = 255 - (255 * i) / (text.length - 1)
FarbwertGruen = 10
FarbwertBlau = 10
document.write("<FONT COLOR='#" + DezNachHex(FarbwertRot) + DezNachHex(FarbwertGruen) + DezNachHex(FarbwertBlau) + "'>" +
text.substring(i, i + 1) +
"</FONT>")
}
}
// -->
</SCRIPT>
<STRONG>
<SCRIPT LANGUAGE="JavaScript">
<!--
Farbspiel("Surfen im Netz, aber bitte mit Pfiff!")
file://-->
</SCRIPT>
</STRONG>
</center>
|
|
Geschrieben von Freshmaker_01
zurück
|
|
|
| |