Suche im Forum:
Suchen


Autor Nachricht
Beitrag23.04.2011 um 16:26 (UTC)    
Titel: In Javascript einen Text farblich machen

Stehe wieder mal vor einem Problem, dieses mal berifft es das Javascript^^


Also ich habe Beispielsweise diesen Javascript Code:



Code:
var zahl1 = 5;
var zahl2 = 10;
if  (var zahl1= var zahl2)
{
document.write("Die Zahlen sind gleich");
}



Mein Problem:


Wie kann ich die Farbe für den Antwortsatz 'Die Zahlen sind gleich' in z.b. der Farbe rot ausgeben?




Vielen Dank für die Antworten! Wink
______________


| Aktuelle Nachrichten | Bibliothek | Events | Gästebuch | Umfragen | TV Programm | Kinovorschau | TopSites | Empfehle Uns | Spiele | Online Karte |

AUF TWITTER AUF FACEBOOK AUF YOUTUBE AUF RSS-FEED


Zuletzt bearbeitet von mario-website am 23.04.2011, 20:14, insgesamt 2-mal bearbeitet
Beitrag23.04.2011 um 20:03 (UTC)    
Titel: Re: In Javascript einen Text farblich machen

normaler weiße würde ich sagen so, aber ob es geht weiß ich nich

Code:
var zahl1 = 5;
var zahl2 = 10;
if  (var zahl1= var zahl2)
{
document.write("<font color="red">Die Zahlen sind gleich</font>");
}

______________
mfg
pokemonshow
_______________________________________________
Beitrag23.04.2011 um 20:20 (UTC)    
Titel:

Habe ich ausprobiert, aber funktioniert leider nicht!


Gibt es noch andere Leute die da eine Idee haben?
______________


| Aktuelle Nachrichten | Bibliothek | Events | Gästebuch | Umfragen | TV Programm | Kinovorschau | TopSites | Empfehle Uns | Spiele | Online Karte |

AUF TWITTER AUF FACEBOOK AUF YOUTUBE AUF RSS-FEED
Beitrag24.04.2011 um 10:37 (UTC)    
Titel:

Zitat:
var zahl1 = 5;
var zahl2 = 10;
if (var zahl1= var zahl2)
{
document.write('<font color="red">Die Zahlen sind gleich</font>');
}


Oder besser:

Zitat:
var zahl1 = 5;
var zahl2 = 10;
if (var zahl1= var zahl2)
{
document.write('<span style="color: red;">Die Zahlen sind gleich</span>');
}

______________

Beitrag10.05.2011 um 20:25 (UTC)    
Titel:

Noch ne andere Frage die habe ich jetzt.

Also hier die neue:


Ich möchte das count farbig (grün) und dick ist wie gehts?



Code:
<script type="text/javascript">
 // Countdown
 var datum = new Date("May 11, 2011 00:00:00 GMT");
 var d = new Date();
 var count = Math.floor((datum.getTime() - d.getTime()) / 1000);
 [color=green]count[/color] = Math.floor(count / (60*60*24));

document.write('<font size="3">In </font>' + count);
Beitrag11.05.2011 um 09:25 (UTC)    
Titel:

Code:
<script type="text/javascript">
 // Countdown
 var datum = new Date("May 11, 2011 00:00:00 GMT");
 var d = new Date();
 var count = Math.floor((datum.getTime() - d.getTime()) / 1000);
 [color=green]count[/color] = Math.floor(count / (60*60*24));

document.write('<font size="3">In </font><font style="color:green;">' + count + '</font>');


Probier's mal so...

Gruß,

TransInt
______________
Kein Support per PN - Im Forum hilft es allen!

Life is what happens while you are busy making other plans.
- John Lennon
Beitrag11.05.2011 um 13:45 (UTC)    
Titel:

Kannst du es auch noch dick machen mit <b>? also nur den Count
______________


| Aktuelle Nachrichten | Bibliothek | Events | Gästebuch | Umfragen | TV Programm | Kinovorschau | TopSites | Empfehle Uns | Spiele | Online Karte |

AUF TWITTER AUF FACEBOOK AUF YOUTUBE AUF RSS-FEED
Beitrag11.05.2011 um 13:55 (UTC)    
Titel:

Code:
<script type="text/javascript">
  // Countdown
  var datum = new Date("May 11, 2011 00:00:00 GMT");
  var d = new Date();
  var count = Math.floor((datum.getTime() - d.getTime()) / 1000);
  [color=green]count[/color] = Math.floor(count / (60*60*24));

 document.write('<font size="3">In </font><font style="color:green; font-weight:bold;">' + count + '</font>');


Grüße Wink
Beitrag11.05.2011 um 14:11 (UTC)    
Titel:

web-cube hat Folgendes geschrieben:
Code:
<script type="text/javascript">
  // Countdown
  var datum = new Date("May 11, 2011 00:00:00 GMT");
  var d = new Date();
  var count = Math.floor((datum.getTime() - d.getTime()) / 1000);
  [color=green]count[/color] = Math.floor(count / (60*60*24));

 document.write('<font size="3">In </font><font style="color:green; font-weight:bold;">' + count + '</font>');


Grüße Wink
Beiträge der letzten Zeit anzeigen:   


Powered by phpBB © 2001, 2005 phpBB Group
Deutsche Übersetzung von phpBB.de