# Rotating html pages

**URL:** <https://forum.kirupa.com/t/rotating-html-pages/107263>\
**Category:** Uncategorized\
**Created:** [April 13, 2004, 8:25pm UTC](https://forum.kirupa.com/t/rotating-html-pages/107263 "2004-04-13T20:25:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pneumonic](https://avatars.discourse-cdn.com/v4/letter/p/aeb1de/32.png) [@Pneumonic](https://forum.kirupa.com/u/Pneumonic)\
**Post date:** [April 13, 2004, 8:25pm UTC](https://forum.kirupa.com/t/rotating-html-pages/107263/1 "2004-04-13T20:25:19Z")

</div>

Alright, so this is what I’m trying to do, but I’m not sure how. I’m trying to have rotating html pages. Let’s say I visit the said page, and then I click refresh it would refresh to the 2nd page. I figured it would work similar to random background images, but it doesn’t seem that way. This is what I figured the code would look like.  
pages = new Array (“index1.html”, “index2.html”);  
random content (){  
randomNumber = random(content.length);

and that’s where I’m stuck. I’m not sure where to go with it after here, nor do I know if that’s right. I’m sure it’s not. I want to use javascript, but don’t know much about it. I’ve heard it’s similar to actionscript, but I wasn’t sure how true it was or wasn’t. Any help is appreciated. Thanks!
