javascript - I need Help !, how to add a delay?

admin

Administrator
Staff member
Hello

i have created two pages one for high res and other for low resolutions, and i want to create a "splash" page that will show some content while redirect the user to the correct resolution main page.
This is the code i磎 using to redirects the user to the correct res page. what i need is to add a delay of X seconds so the user can see the content of "splash" page before being redirected.How can i do this?

<script>
<!--
if (screen.width<=640)
top.location.href="index640.html";
if (screen.width<=800)
top.location.href="index800.html";
if (screen.width<=1024)
top.location.href="index1024.html";
top.location.href="index1280.html";
//-->
</script>



Thank you.
 
Back
Top