Bob SpAce

Be myself!Do myself!

JS 获取当前年份

Written By bob

function now(){
var myDate = new Date();
var nowTime = myDate.getFullYear();
document.getElementById("now").innerHTML = nowTime;
}
setInterval("now()",1000);

打赏 分享
取消

如果您觉得我的文章对您有所帮助,欢迎您打赏一点咖啡钱~

扫码支持
您的打赏是我的动力!

打开支付宝扫一扫,即可进行扫码打赏哦~

Comments are closed.