+ 2
5sec wait or something
Guys I really need ya help Im making a project and I'd like to ask:how to make a page stay 5secs and load another html page.For example:http://dota2.net/ this website checks the browser if its valid it proceeds to forum.In my case it will just be inscription (Welcome) and waits 5 secs and loads my forum.And can it be done without js?
10 Answers
0
If you want it cut down to a short example, I made one here to see what I could do.
https://code.sololearn.com/WI8aU88AvaIF/?ref=app
+ 1
thank u mate
+ 1
thanks a lot
0
I made a game that has a loading screen that does the same thing you want. feel free to copy that part of my code and use it as you need.
https://code.sololearn.com/WFseja10kYEQ/?ref=app
0
if you need me to explain anything just let me know
0
u mean your loading ?Ok.How to make it stay a bit longer(+3 seconds).Because your loading is too fast
0
Short answer is JS is the only way. HTML can't make decisions. CSS is only for styles.
- 1
look in my javascript. find navigation functions. inside there you'll see setTimeout....
setTimeout(function() {
load.style.display = "none";
}, 2000);//Time in ms, 1000ms = 1s
the time is in milliseconds so if you want it to be 5 seconds change it from 2000 to 5000
- 1
it's in the very first function
- 1
you're welcome. if you need more clarification let me know and I'll make a specific code explaining how it works