Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript redirect after 5 secinds

setTimeout(function(){
            window.location.href = 'https://url.com';
         }, 5000);
Comment

javascript to redirect to another page after 5 seconds

<!DOCTYPE html>
<html>
   <body>
      <script>
         setTimeout(function(){
            window.location.href = 'https://www.tutorialspoint.com/javascript/';
         }, 5000);
      </script>
      <p>Web page redirects after 5 seconds.</p>
   </body>
</html>
Comment

Redirect to any page after 5 seconds in Javascript

// Redirect to index page after 5 sec
setTimeout(function(){ window.location="index"; },5000);
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript get attribute 
Javascript :: javascript even mouseout 
Javascript :: update nodejs 
Javascript :: shorthand for document.ready 
Javascript :: javascript indexOf object value in array 
Javascript :: ajax request header laravel 
Javascript :: how to check if selector exists or is present puppeteer 
Javascript :: javascript detect touch screen 
Javascript :: js number remove last 2 characters 
Javascript :: chart js hide legend 
Javascript :: js current time 
Javascript :: js set class 
Javascript :: change id in jquery 
Javascript :: wait for element javascript 
Javascript :: aws secret manager nodejs javascript 
Javascript :: get value onChange from mat-select angular 
Javascript :: electron hide top bar 
Javascript :: discord.js get user by id 
Javascript :: moment today date 
Javascript :: how to convert seconds into days hours seconds js 
Javascript :: jquery set value by name 
Javascript :: parsefloat jquery 
Javascript :: jquery if checkbox checked 
Javascript :: javascript reduce function to get sum of object value 
Javascript :: get data and time in javascript 
Javascript :: regex get only domain name from url 
Javascript :: download canvas as image 
Javascript :: remove last character from string js 
Javascript :: format percentage javacsript 
Javascript :: jquery json decode 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =