Execute script after specific delay using JavaScript

前端 未结 15 1757
陌清茗
陌清茗 2020-11-22 12:29

Is there any JavaScript method similar to the jQuery delay() or wait() (to delay the execution of a script for a specific amount of time)?

15条回答
  •  有刺的猬
    2020-11-22 12:49

    You can also use window.setInterval() to run some code repeatedly at a regular interval.

提交回复
热议问题