I've found a basic script, however I also need to add alt and title
attributes as well, how would I go about doing this?
Here's the script I found:
Thanks
<script language="JavaS cript">
<!--
/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink( ){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="../images/s01.jpg"
myimages[2]="../images/s02.jpg"
myimages[3]="../images/s03.jpg"
myimages[4]="../images/s04.jpg"
myimages[5]="../images/s05.jpg"
myimages[6]="../images/s06.jpg"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="../photos/01.html"
imagelinks[2]="../photos/02.html"
imagelinks[3]="../photos/03.html"
imagelinks[4]="../photos/04.html"
imagelinks[5]="../photos/05.html"
imagelinks[6]="../photos/06.html"
var ry=Math.floor(M ath.random()*my images.length)
if (ry==0)
ry=1
document.write( '<a href='+'"'+imag elinks[ry]+'"'+'><img
src="'+myimages[ry]+'" border=0></a>')
}
random_imglink( )
//-->
</script>
--
Olly
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
attributes as well, how would I go about doing this?
Here's the script I found:
Thanks
<script language="JavaS cript">
<!--
/*
Random Image Link Script- By JavaScript Kit(http://www.javascriptkit.com)
Over 200+ free JavaScripts here!
Updated: 00/04/25
*/
function random_imglink( ){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="../images/s01.jpg"
myimages[2]="../images/s02.jpg"
myimages[3]="../images/s03.jpg"
myimages[4]="../images/s04.jpg"
myimages[5]="../images/s05.jpg"
myimages[6]="../images/s06.jpg"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="../photos/01.html"
imagelinks[2]="../photos/02.html"
imagelinks[3]="../photos/03.html"
imagelinks[4]="../photos/04.html"
imagelinks[5]="../photos/05.html"
imagelinks[6]="../photos/06.html"
var ry=Math.floor(M ath.random()*my images.length)
if (ry==0)
ry=1
document.write( '<a href='+'"'+imag elinks[ry]+'"'+'><img
src="'+myimages[ry]+'" border=0></a>')
}
random_imglink( )
//-->
</script>
--
Olly
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
Comment