Ronny: bei document.write Farbe ändern ? Hilfe !!!

Zur späten Stunde...

Ich habe diese Scriptzeile auf meiner Homepage:
document.write("Your IP address is " + ip);

Wie kann man Font und Farbe ändern?

So sollte es doch funktionieren, oder ? ( klappt aber nicht )
document.write("<font color="#FFFFFF">");
document.write("Your IP address is " + ip);
document.write("</font>");

Viele Grüße, Ronny

  1. So sollte es doch funktionieren, oder ? ( klappt aber nicht )
    document.write("<font color="#FFFFFF">");
    document.write("Your IP address is " + ip);
    document.write("</font>");

    Nö, kann ja auch nicht, du darfst das color attribut nicht mit " abgrenzen, sonst beendest Du bei javascript den String. Benutze ' und es geht...
    document.write("<font color='#FFFFFF'>");
    document.write("Your IP address is " + ip);
    document.write("</font>");

    1. Danke, Danke !

      Und Gute Nacht !

      Ronny