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 Get Your Blogs Posts Using Blogger API

30-07-2017 blogger api json php

How to submit form using javascript or jquery.

16-04-2017 javascript jquery submit form

How to insert bulk information into database in single query execution

18-03-2017 insert sql bulk database

Filter for change Date Time format (MM-dd-yyyy HH:mm) in Angular Js

05-03-2017 mm-dd-yyyy HH:MM date formats angular js

Filter for change Date format (MM-dd-yyyy) in Angular Js

05-03-2017 mm-dd-yyyy date formats angular js