计时器例子

setInterval(

"document.getElementById('time').innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());"

,1000);

原文地址:https://www.cnblogs.com/justinsun/p/2151412.html