Javascript examples for Browser Object Model:Window setTimeout
Create your own async function with setTimeout()
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w . j a v a 2 s.c om*/ async(console.log, "This will display later."); console.log("This will display first."); function async(funct) { setTimeout.bind(null, funct, 0).apply(null, [].slice.call(arguments, 1)); } } </script> </head> <body> </body> </html>