js code executes an instance of a function after a certain delay

  • 2021-07-21 07:10:17
  • OfStack

Examples are as follows:


 setTimeout(funcName,500);
		
    function funcName() {
      xxxxxx;
    }


Execute funcName () after 0.5 seconds, only once

setInterval (funcName, 5000); Execute funcName () every 5 seconds


Related articles: