blog头部代码(二)
作者:cmscn 日期:2006-05-04
<SCRIPT language="JavaScript"><!--
today=new Date();
jran=today.getTime();
function rnd() {
ia=9301;
ic=49297;
im=233280;
jran = (jran*ia+ic) % im;
return jran/(im*1.0);
};
function rand(number) {
return Math.ceil(rnd()*number);
};
document.write("<CENTER>");
for(i=1;i<=1;i++) {
myNum=(rand(12));
//please adjust the number here, the number "3" mean three pieces.
if(myNum == 1) document.write("<img src='images/bannerss/webbanner1.jpg'>");
if(myNum == 2) document.write("<img src='images/bannerss/webbanner2.jpg'>");
if(myNum == 3) document.write("<img src='images/bannerss/webbanner3.jpg'>");
if(myNum == 4) document.write("<img src='images/bannerss/webbanner4.jpg'>");
if(myNum == 5) document.write("<img src='images/bannerss/webbanner5.jpg'>");
if(myNum == 6) document.write("<img src='images/bannerss/webbanner6.jpg'>");
if(myNum == 7) document.write("<img src='images/bannerss/webbanner7.jpg'>");
if(myNum == 8) document.write("<img src='images/bannerss/webbanner8.jpg'>");
if(myNum == 9) document.write("<img src='images/bannerss/webbanner9.jpg'>");
if(myNum == 10) document.write("<img src='images/bannerss/webbanner10.jpg'>");
if(myNum == 11) document.write("<img src='images/bannerss/webbanner11.jpg'>");
if(myNum == 12) document.write("<img src='images/bannerss/webbanner12.jpg'>");
//Add or Remove above sentences up to the pieces of BANNER. Something behind “src” is the save location of BANNER.
else {
document.write();
}
};
document.write("</CENTER>");
//-->
</SCRIPT>
评论: 6 | 引用: 9 | 查看次数: 775
发表评论