我应该在这行代码中插入什么代码才能将字体颜色更改为白色,我应该怎么做?
document.getElementById('clockbox').innerHTML=""+tday[nday]+", "+tmonth[nmonth]+" "+ndate+", "+nyear+" | "+nhour+":"+nmin+":"+nsec+ap+"";
setTimeout("GetClock()", 1000);
答案 0 :(得分:3)
var x = document.getElementById('clockbox');
x.style.color = '#FFFFFF';
答案 1 :(得分:0)
只需:
document.getElementById('clockbox').style.color="white";