how to update time regularly?

后端 未结 10 864
再見小時候
再見小時候 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:26

    x = document.getElementsByTagName('SPAN').item(0);
    x.innerHTML = f_date;
    

    try putting this code block instead of return statement, i haven't test it but it will probably work

提交回复
热议问题