how to update time regularly?

后端 未结 10 866
再見小時候
再見小時候 2020-12-03 02:11
function timeClock()
{
    setTimeout(\"timeClock()\", 1000);        
    now = new Date();
    alert(now);
    f_date = now.getDate()+\" \"+strMonth(now.getMonth())         


        
10条回答
  •  误落风尘
    2020-12-03 02:19

    I'd use setInterval rather than setTimeout:

    https://developer.mozilla.org/en/DOM/window.setInterval

提交回复
热议问题