Skip to content Skip to sidebar Skip to footer

Redirect To Home Page After 3 Seconds

i created a simple login that the user will fill in and after successfully login he will redirectly go another page that has a message login successful, Now my problem is after th

Solution 1:

You can use setTimeout to set time after which user will be redirected and window.location to set the URL where the users should be redirected

setTimeout(function(){ window.location = "http://www.yoururl.com"; },3000);

Solution 2:

<script type="text/javascript">
        $(document).ready(function () {
            setTimeout(function () {
                window.location = "you Home Page URL";
            }, 3000);
        });
    </script>

Post a Comment for "Redirect To Home Page After 3 Seconds"