How to execute a function after some time javascript -


i want write javascript code can excute function after 30 minutes.

say have function called getscore , function called getresult. want functions executed after 30 minutes.

it's quiz purpose, quiz duration 30 minutes, after time passes,both functions should executed.

you should use settimeout():

settimeout(function() {     getscore();      getresult();  }, 1800000); 

the '1800000' time in milliseconds after want function execute. in case, 30 minutes.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -