Lyra Opeña
Lyra Opeña

Reputation: 5

Change the font color into white - JS

What code should I insert within this line of code to change the font color into white and how should I do it ?

document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyear+" | "+nhour+":"+nmin+":"+nsec+ap+"";
setTimeout("GetClock()", 1000);

Upvotes: 0

Views: 90

Answers (2)

nicael
nicael

Reputation: 18995

Just:

document.getElementById('clockbox').style.color="white";

Upvotes: 0

Vladu Ionut
Vladu Ionut

Reputation: 8193

var x = document.getElementById('clockbox');
x.style.color = '#FFFFFF';

Upvotes: 3

Related Questions