JS图片新窗口打开
today=newDate();jran=today.getTime();functionrnd(){ia=9301;ic=49297;im=233280;jran=(j...
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(4)); //改成你要随机显示的图片数;document.writeln("<a href=\"\/a\/wap.html\" target=\"_blank\"><\/a>")
if(myNum == 1) document.write("<a href='%%START_LINK%%/%%END_LINK%%'><img src='/templets/css/ad/banner1.jpg' border=0></a>");
if(myNum == 2) document.write("<a href='%%START_LINK%%/%%END_LINK%%'><img src='/templets/css/ad/banner2.jpg' border=0></a>");
if(myNum == 3) document.write("<a href='%%START_LINK%%/%%END_LINK%%'><img src='/templets/css/ad/banner3.jpg' border=0></a>");
if(myNum == 4) document.write("<a href='%%START_LINK%%/plus/view.php?aid=79%%END_LINK%%'><img src='/templets/css/ad/banner4.jpg' border=0></a>");
else {
document.write();
}
};
document.write("</center>");
以上代码怎么实现新窗口打开啊!现在是原页面打开! 展开
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(4)); //改成你要随机显示的图片数;document.writeln("<a href=\"\/a\/wap.html\" target=\"_blank\"><\/a>")
if(myNum == 1) document.write("<a href='%%START_LINK%%/%%END_LINK%%'><img src='/templets/css/ad/banner1.jpg' border=0></a>");
if(myNum == 2) document.write("<a href='%%START_LINK%%/%%END_LINK%%'><img src='/templets/css/ad/banner2.jpg' border=0></a>");
if(myNum == 3) document.write("<a href='%%START_LINK%%/%%END_LINK%%'><img src='/templets/css/ad/banner3.jpg' border=0></a>");
if(myNum == 4) document.write("<a href='%%START_LINK%%/plus/view.php?aid=79%%END_LINK%%'><img src='/templets/css/ad/banner4.jpg' border=0></a>");
else {
document.write();
}
};
document.write("</center>");
以上代码怎么实现新窗口打开啊!现在是原页面打开! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询