anotherad.js
来自「2007年华中科技大学数据库课程设计参考程序[图书销售系统]+报告」· JavaScript 代码 · 共 55 行
JS
55 行
var imgUrl=new Array();
var imgLink=new Array();
var adNum=0;
var it=1;
imgUrl[it]="js/1.jpg";
imgLink[it++]="download.aspx?softid=818";
imgUrl[it]="js/2.gif";
imgLink[it++]="download.aspx?softid=823";
imgUrl[it]="js/3.gif";
imgLink[it++]="download.aspx?softid=825";
imgUrl[it]="js/4.gif";
imgLink[it++]="download.aspx?softid=824";
imgUrl[it]="js/5.jpg";
imgLink[it++]="download.aspx?softid=824";
//imgUrl[it]="ad/3.gif";
//imgLink[it++]="download.aspx?softid=1";
var imgPre=new Array();
var j=0;
for (i=1;i<=5;i++) { //i表示个数
if( (imgUrl[i]!="") && (imgLink[i]!="") ) {
j++;
} else {
break;
}
}
function playTran(){
if (document.all){
document.imgInit.filters[0].play();
}
}
function nextAd(){
if(adNum<j)adNum++ ;
else adNum=1;
if (document.all){
document.imgInit.filters[0].Transition=26;
document.imgInit.filters[0].apply();
}
document.images.imgInit.src=imgUrl[adNum];
playTran();
theTimer=setTimeout("nextAd()", 3000);
}
function goUrl(){
jumpUrl=imgLink[adNum];
jumpTarget='_self';
if (jumpUrl != ''){
if (jumpTarget != '')
window.open(jumpUrl,jumpTarget);
else
location.href=jumpUrl;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?