简体   繁体   English

将字体颜色更改为白色-JS

[英]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);
var x = document.getElementById('clockbox');
x.style.color = '#FFFFFF';

只是:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM