Andy's Blog » » 完美随机广告代码

完美随机广告代码

<SCRIPT LANGUAGE="JavaScript"><!-- BANNER ROTATOR
 
var how_many_ads = 3
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
 
 
//**************************** AD NUMBER ONE ****************
 
if (ad==1){
 
 
url="http://www.youradvertiser.com";
 
alt="Advertiser NumberOne";
 
banner="http://www.yourdomain.com/images/banner1.gif";
 
width="468";
height="60";
}
 
//**************************** AD NUMBER TWO ****************
 
 
if (ad==2) {
 
 
url="http://www.youradvertiser.com";
 
alt="Advertiser Number Two";
 
banner="http://www.yourdomain.com/images/banner2.gif";
 
width="468";
height="60";
}
 
 
//**************************** AD NUMBER ONE ****************
 
if (ad==3) {
 
 
url="http://www.youradvertiser.com";
 
alt="Advertiser Number Three";
 
banner="http://www.yourdomain.com/images/banner3.gif";
 
width="468";
height="60";
}
 
 
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_blank\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('</center>');
--><
/SCRIPT>

Incoming search terms:

Tags:

本文地址: http://www.21andy.com/new/20050905/60.html