<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Change Images</title>
</head>
<body>
<script language="JavaScript">
<!--
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
//alert("VAL: " + ad);
if (ad==1) {
alt="PRIME definition"; banner="http://www.webmaster-talk.com/images/image1.jpg";
width="750";
height="500";
}
if (ad==2) {
alt="PRIME definition"; banner="http://www.webmaster-talk.com/images/image2.jpg";
width="750";
height="500";
}
if (ad==3) {
alt="PRIME definition"; banner="http://www.webmaster-talk.com/images/image3.jpg";
width="750"; height="500";
}
document.write('<center>');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('</center>');
// -->
</script>
</body>
</html>
this is the code... please have a look
images should be come in sequence...like img1 ,img2, img3....... img1, img2. img3... for every refresh ... but not randomly... and work in all browser...
thanking you
soumen
__________________
ssp
Last edited by soumen_07; 07-27-2009 at 01:37 AM..
|