电脑技术学习

最新随机广告代码

dn001

随机广告代码,图片大小,地址,链接自己定义,要几个广告就加几个,其中how_many_ads=就控制广告数量,要几个广告就复制几段代码,这里是三个广告。

以下是引用片段:
<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.cnzz.cc";

alt="Advertiser Number One";

banner="http://www.cnzz.cc/cn888/UploadADPic/200807/2008070315243685.gif";

width="300";
height="300";
}

//**************************** AD NUMBER TWO ****************


if (ad==2) {


url="http://www.cnzz.cc";

alt="Advertiser Number Two";

banner="http://www.cnzz.cc/cn888/UploadADPic/200807/2008070315251311.gif";

width="300";
height="300";
}

//**************************** AD NUMBER TWO ****************


if (ad==3) {


url="http://www.cnzz.cc";

alt="Advertiser Number Two";

banner="http://img.pc004.com/p/2009-08-21/20090821091555755.gif";

width="300";
height="300";
}

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>
")<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.cnzz.cc";

alt="Advertiser Number One";

banner="http://www.cnzz.cc/cn888/UploadADPic/200807/2008070315243685.gif";

width="300";
height="300";
}

//**************************** AD NUMBER TWO ****************


if (ad==2) {


url="http://www.cnzz.cc";

alt="Advertiser Number Two";

banner="http://www.cnzz.cc/cn888/UploadADPic/200807/2008070315251311.gif";

width="300";
height="300";
}

//**************************** AD NUMBER TWO ****************


if (ad==3) {


url="http://www.cnzz.cc";

alt="Advertiser Number Two";

banner="http://img.pc004.com/p/2009-08-21/20090821091555755.gif";

width="300";
height="300";
}

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>
")