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 :: reverse string in js 
Javascript :: onchange value in hidden input 
Javascript :: javascript detect tab leave 
Javascript :: how to convert string to sentence case in javascript 
Javascript :: check time javascript 
Javascript :: reload datatable 
Javascript :: cm to feet javascript 
Javascript :: getting empty req.body 
Javascript :: js map through array and return array of objects 
Javascript :: how to make a string with unique characters js 
Javascript :: open folder node js 
Javascript :: Visible, non-interactive elements with click handlers must have at least one keyboard listener jsx-a11y/click-events-have-key-events 
Javascript :: convert an object to an array 
Javascript :: jquery cget lineheight in pixels 
Javascript :: express command not found mac 
Javascript :: how to check checkbox using jquery 
Javascript :: ng model on change 
Javascript :: javascript filter array of objects by array 
Javascript :: remove empty option from bootstrap select javascript 
Javascript :: process.env 
Javascript :: how to give width through props 
Javascript :: react map gl 
Javascript :: round value up javascript 
Javascript :: inline style react with true or false 
Javascript :: leaflet change marker location 
Javascript :: javascript array split empty string 
Javascript :: create dynamic element in javascript 
Javascript :: react dynamic import 
Javascript :: jquery ajax form submit example 
Javascript :: how to use infinite scroll in angular 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =