Friday, 7 July 2017

Redirect a web page to another web page

Here two method of redirection of web page

First method :

simple copy and paste this code :

<meta http-equiv="refresh" content="10; url=" /> 

in your web page. change with your target web page url. where you want redirect to page. content="10" here 10 is 10 sec you can change time as per your need.

Second method : jave script

simple copy and paste this code :

<p>You will be redirected home page in <span id="counter">10</span> second(s). If You not redirected <a href="">Click here for home page</a></a></p>
<script type="text/javascript">
function countdown() {
    var i = document.getElementById('counter');
    if (parseInt(i.innerHTML)<=0) {
        location.href = '';
    i.innerHTML = parseInt(i.innerHTML)-1;
setInterval(function(){ countdown(); },1000);