1. Copy this code into the website where you would like the images to rotate. You can also save this code in a separate file (ex. rotateImageOnRefresh.js) and include it where you would like to use it:
Code:
<script src="pathToFile/rotateImageOnRefresh.js"></script>
########### IMAGE ROTATE CODE BELOW ############
Code:
var featureNo
var myFeature = new Array()
<!-- CHANGE img src= to the file path of your image --!>
myFeature[] = '<img src="images/features/01.jpg" width="356" height="220" alt="Put Your ALT TAG here" border="0">'
myFeature[] = '<img src="images/features/02.jpg" width="356" height="220" alt="Put Your ALT TAG here" border="0">'
myFeature[] = '<img src="images/features/03.jpg" width="356" height="220" alt="Put Your ALT TAG here" border="0">'
myFeature[] = '<img src="images/features/04.jpg" width="356" height="220" alt="Put Your ALT TAG here" border="0">'
myFeature[] = '<img src="images/features/05.jpg" width="356" height="220" alt="Put Your ALT TAG here" border="0">'
<!-- DONT TOUCH BELOW -->
featureNo = Math.round(Math.random() * (myFeature.length -1))
document.write(myFeature[featureNo])