• Welcome to Simple Machines Community Forum. Please login or sign up.
December 03, 2021, 09:42:38 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


求助,回转的banner怎样才能让它们不在原来的窗口打开

Started by moneydiscuss, January 23, 2007, 07:27:15 AM

Previous topic - Next topic

moneydiscuss


我用的是这个代码:

<SCRIPT LANGUAGE="JavaScript">



<!-- Begin
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="The World's Largest Online Bookstore, Amazon.com";
url="http://www.amazon.com";
alt="amazon.com";
banner="http://imageserv.imgis.com/images/Ad12669St1Sz1Sq1_Ban1.gif";
width="468";
height="60";
}
if (ad==2) {
txt="Palm III by 3Com, in stock!";
url="http://cybershop.com/";
alt="cybershop.com";
banner="http://imageserv.imgis.com/images/Ad13189St1Sz1Sq5_Ban10.gif";
width="468";
height="60";
}
if (ad==3) {
txt="Find it at GoTo.com";
url="http://www.goto.com";
alt="goto.com";
banner="http://imageserv.imgis.com/images/Ad13700St1Sz1Sq1_Ban1.gif";
width="468";
height="60";
}
document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End -->
</SCRIPT>


但是点击图片的时候是在原窗口打开目标连接的。

怎么修改代码,点击图片新打开一个窗口? :'(

moneydiscuss

还有一个问题,这个代码默认的是在页子中间显示的,

我的站 :http://moneydiscuss.com/index.php

上边放了728X90 的banner用的这个代码,可以回转(每刷新一次,广告随机更换)

但是下边还有4个468X60的banner 左右排列的,这个代码用不了。

哪位朋友可以提供一个可以用的代码,让那4个小 banner 也会回转? ??? :'(

moneydiscuss

问题早解决了
有需要代码的朋友可以参考下我的

另外把论坛移到了这个地址下:

http://www.invest-tracing.com/forum/index.php

Advertisement: