Rakesh Rakesh - 1 year ago 181
Javascript Question

Pass parameters in setInterval function

How to pass parameter while call a function using setInterval.

is incorrect.

Answer Source

You need to create an anonymous function so the actual function isn't executed right away.

setInterval( function() { funca(10,3); }, 500 );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download