Javascript setInterval not working

后端 未结 4 1280
没有蜡笔的小新
没有蜡笔的小新 2020-11-30 23:25

I need to run a javascript function each 10 seconds.

I understand the syntax must work like follow but I am not getting any success:

function funcNam         


        
4条回答
  •  误落风尘
    2020-12-01 00:03

    Change setInterval("func",10000) to either setInterval(funcName, 10000) or setInterval("funcName()",10000). The former is the recommended method.

提交回复
热议问题