Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

Redirection with js

0 votes
89 views
added Mar 23, 2018 in Javascript by LC Marshal Captain (26,080 points)
edited Jul 13, 2018 by LC Marshal
<html>
    <body>
    <p>You will be redirected in 5 seconds</p>
    <script>
        var timer = setTimeout(function() {
            window.location='http://hormart.com'
        }, 5000);
    </script>
</body>
</html>

1 Response

0 votes
responded Mar 3 by lcjr First Warrant Officer (7,650 points)
// target blank redirection
window.open('http://www.example.com', '_blank');

// parent redirection
window.location.href = "http://www.example.com";

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...