Reputation: 57
I want to show Loading(Gif) image for 3 seconds and want to open a website link(Say http://example.com), after the timer(3 Seconds) is complete. How to set timeout in HTML?
Upvotes: 0
Views: 2273
Reputation: 942
You can use the html redirect
<meta http-equiv="refresh" content="3; url=http://stackoverflow.com/" />
The number in content
means seconds until the page is redirected to the next paramenter, url
.
Upvotes: 1
Reputation: 8087
You should be able to achieve this by using JavaScript's setTimeout
<script>
window.setTimeout( function(){
window.location = "http://www.example.com";
}, 3000);
</script>
Upvotes: 1
Reputation: 488
You can use JavaScript for that: setTimeout
setTimeout(function( ){ location.href = 'http://google.com'; }, 3000);
Upvotes: 2