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 :: How to get the browser to navigate to a URL in JavaScript 
Javascript :: react native reset cache 
Javascript :: react native nox emulator 
Javascript :: enable button jquery 
Javascript :: jquery selector input by type 
Javascript :: update node.js dependencies 
Javascript :: js get base url 
Javascript :: listerner content loaded js 
Javascript :: javascript remove all newlines 
Javascript :: change src of iframe jquery 
Javascript :: angular JavaScript heap out of memory 
Javascript :: how to get element by title js 
Javascript :: regex remove html tags 
Javascript :: jquery-3.6.0.min.js 
Javascript :: js scroll to id 
Javascript :: check device width using js 
Javascript :: content of page fully loaded javascript 
Javascript :: how to change a css variable with javascript 
Javascript :: js mouse position relative to element 
Javascript :: moment format datetime postgresql 
Javascript :: select first option in dropdown jquery 
Javascript :: vue pdf vue jest 
Javascript :: settimeout jquery 
Javascript :: three js clock 
Javascript :: npx react 
Javascript :: regex yyyy-mm-dd 
Javascript :: parse document.cookie 
Javascript :: running shell commands javascript 
Javascript :: how to check if a string has only alphabets in javascript 
Javascript :: shorthand for document.ready 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =