Call a function every second or 5 seconds in javascript

setinterval
function calling

call a javascript function every 5 seconds continously.  You can use setInterval(). The below code is working from onload.

setInterval(test,5000);
function test()
{
	alert("hi");
}

 

 

You might also like:

How to search text in string using php ?

29-10-2017 php search string search

How to insert bulk information into database in single query execution

18-03-2017 insert sql bulk database

How to use request module in node js

16-03-2017 request module node js

Sanitization in java sript

14-03-2017 sanitization java script

Remove last two characters from given string

06-03-2017 substring javascript remove