Slide Show 005
A:hover {color: #FF0000; font-family: Arial}
myPics = new Array("images/bh1.jpg","images/bh2.jpg","images/bh3.jpg","images/bh4.jpg")
imgCt = myPics.length
function choosePic() {
if (document.images) {
randomNum = Math.floor
((Math.random() * imgCt))
document.birdHouse.src=myPics[randomNum]
}
}
Back
Slide Show 005
This script displays a random image every time the page
is loaded. This is a good script to show a different image every
time the visitor visits the website. So it looks fresh. Images in
yellow. Document tag
in pink.
Script instructions for <HEAD></HEAD> tags
<!-- Paste between the <HEAD></HEAD> tags.
-->
<!-- Ultimatephp.com -->
<SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
myPics = new Array("images/bh1.jpg","images/bh2.jpg","images/bh3.jpg","images/bh4.jpg")
imgCt = myPics.length
function choosePic() {
if (document.images) {
randomNum = Math.floor
((Math.random() * imgCt))
document.birdHouse.src=myPics[randomNum]
}
}
</SCRIPT>
Script for the <BODY> tag of the HTML
Document
onLoad="choosePic()"
Paste where needed it the body of the HTML
Document.
<!-- Paste where needed in the HTML -->
<div align="center">
<center>
<table border="5" cellpadding="5" cellspacing="0" width="23%">
<tr>
<td width="100%">
<p align="center">
<img border="0" src="images/bh1.jpg"
width="200" height="311" name="birdHouse"></td>
</tr>
</table>
</center>
</div>
Paste script between the <HEAD></HEAD> tags.
myPics = new Array("images/bh1.jpg","images/bh2.jpg","images/bh3.jpg","images/bh4.jpg")
imgCt = myPics.length
function choosePic() {
if (document.images) {
randomNum = Math.floor
((Math.random() * imgCt))
document.birdHouse.src=myPics[randomNum]
}
}
Script for the <BODY> tag of the HTML
Document
onLoad="choosePic()"
Paste script where needed in the body of the HTML Document.
© Copyright 2003
Ultimatephp.com
Wyszukiwarka
Podobne podstrony:
fading slide showslide show 3slide show 0061974 WT Historical Slide Show Info Sheetslide show 002slide show 001slide show (2)show listshow infoshow?itAudioslave Show Me How To Lifeles05?l rows20 show mefunction cpdf show xyles10 man tblspc10 show meNokia 3600 Slide Instrukcja Obsługi PLfunction cpdf showJims G0602 Cross Slide Upgradewięcej podobnych podstron