w3schools ajax time limit code example Example: delay in javascript setTimeout(function() { //your code here }, 1000);