Javascript function with two parameters.

setInterval(A,B);

A is a string of code, for instance:

setInterval("doMove();",B);

B is an integer I believe. I've never tried to use a floating point. Either way, it's the number of milliseconds (.001 seconds) between each execution of the string.

setInterval("doMove();",1000);

This would execute the doMove function once every second. Very useful function because Javascript has this problem with loops. If the loop is too long, Javascript stops it short for security reasons. This continues until the page is unloaded.

See also: setTimeout, eval

Log in or register to write something here or to contact authors.