Solved

New Page when Refreshed, Using Javascript

Posted on 1997-01-27
1
250 Views
Last Modified: 2013-12-25
I would like to know how to use Javascript, if possible, to load a new page every time my web site is hit, or reloaded.
ie:
index1.html
index2.html
index3.html
...up to 10 (or whatever number)

each time someone hits, or reloads, a different, random, welcome page is loaded.

Can this even be done?
0
Comment
Question by:ghstrydr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
pc012197 earned 50 total points
ID: 1853894
try the following as "index.html"

<html><head><title>loader page</title>
<script>
function newpage()
{
    window.location="index"+Math.ceil(10*Math.random())+".html";
}
</head>
<body onLoad="newpage();">
this is a dummy page
</body></html>

This is about all you need.

0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This video teaches users how to migrate an existing Wordpress website to a new domain.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question