I was just wondering how I could make a person stay on a website for a specific time and then redirect them to a new website using JavaScript! Thanks for your help!
I repeat, using JavaScript, this is not the same as the other ones, I want to use JS
I was just wondering how I could make a person stay on a website for a specific time and then redirect them to a new website using JavaScript! Thanks for your help!
I repeat, using JavaScript, this is not the same as the other ones, I want to use JS
 
    
    Will take you to Google after 3 seconds.
var timer = setTimeout(function() { window.location.href = 'http://www.google.com'; }, 3000);
Please always set the timeout to variable for the possibility to clear the timeout.
clearTimeout(timer); 
 
    
    setTimeout(myFunction, 2000);
myFunction should use window.location.href = 'my_Link';
