window
2013-08-20 72 views 0 likes 
0

我从供应商那里获得了一些代码,当我的网站从买方购买任何商品的网站时,我的组织可以获得积分。问题在于,窗口在广告内部打开,而不是在新窗口中。如何获得javescript AD在新窗口中打开链接?

下面是代码...我需要添加什么?或改变?允许它在新窗口中打开?

<script type="text/javascript"> function vcp_gobad175(){ window.location='https://www.virtualcapoeira.com/store.htm?affcode=1039380713'; } </script> <div align="center"> <table border="0" cellpadding="0" style="border-collapse: collapse" id="capafftable1" bgcolor="#FFFFFF"> <tr> <td align="center" height="3"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="175" height="150" id="ba175x150_02" align="middle"> <param name="allowScriptAccess" value="always" /> <param name="movie" value="https://www.virtualcapoeira.com/graphics/ba175x150_02.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed sRc="https://www.virtualcapoeira.com/graphics/ba175x150_02.swf" quality="high" bgcolor="#000000" width="175" height="150" name="ba175x150_02" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /> </object> </td> </tr> <tr> <td align="center" height="3"></td> </tr> <tr> <td align="center"> <a target="_blank" title="Capoeira" style="font-size: 13px; font-weight: 700; color: #0066CC;" href="https://www.virtualcapoeira.com/store.htm?affcode=1039380713">VirtualCapoeira.com</a></td> </tr> <tr> <td style="font-size: 9px; color: #0066CC;" align="center"> <a target="_blank" title="Capoeira Music, Audio, MP3s, Downloads" style="font-size: 9px; text-decoration: none; color: #0066CC;" href="https://www.virtualcapoeira.com/music-store.htm?affcode=1039380713">Music</a>,  <a target="_blank" title="Capoeira Videos, DVDs, Downloads" style="font-size: 9px; text-decoration: none; color: #0066CC;" href="https://www.virtualcapoeira.com/video-store.htm?affcode=1039380713">Videos</a>,  <a target="_blank" title="Capoeira Instruments, Berimbaus, Atabaques, Pandeiros, Agogos, RecoRecos" style="font-size: 9px; text-decoration: none; color: #0066CC;" href="https://www.virtualcapoeira.com/berimbaus.htm?affcode=1039380713">Instruments</a> &  <a target="_blank" title="Capoeira Pants, Tops, Havaianas, Downloads" style="font-size: 9px; text-decoration: none; color: #0066CC;" href="https://www.virtualcapoeira.com/store.htm?affcode=1039380713">Gear</a> </td> </tr> <tr> <td style="font-size: 9px; font-weight: 700; color: #000000;" align="center"> <a target="_blank" title="Capoeira" style="font-size: 9px; text-decoration: none; color: #000000;" href="https://www.virtualcapoeira.com/index.htm?affcode=1039380713">Capoeira</a> - Are you Game?</td> </tr> </table> </div>

回答

0

使用window.open

function vcp_gobad175(){ 
    window.open('https://www.virtualcapoeira.com/store.htm?affcode=1039380713', '_blank'); 
} 
0

你可以使用这样

<a href="javascript:void(0)" 
onclick="window.open('http://www.google.com','name', 
'width=600,height=400')">Link</a> 

这将在新窗口中打开链接。测试工作

相关问题