Javascript 在新窗口中从Iframe(fancybox)打开链接
我正在使用fancybox弹出窗口用raphael脚本构建一幅欧洲地图,当单击country时,它会显示一个Javascript 在新窗口中从Iframe(fancybox)打开链接,javascript,jquery,fancybox,raphael,Javascript,Jquery,Fancybox,Raphael,我正在使用fancybox弹出窗口用raphael脚本构建一幅欧洲地图,当单击country时,它会显示一个iframe 单击iframe内的链接时,新页面将在iframe内打开,但我希望在新窗口中打开该链接 这是我写给拉斐尔的剧本: greek[state].click(function(){ $j.fancybox({ 'showCloseButton': true, 'href' : 'link.html', 'width' : 500, 'height'
iframe
单击iframe
内的链接时,新页面将在iframe
内打开,但我希望在新窗口中打开该链接
这是我写给拉斐尔的剧本:
greek[state].click(function(){
$j.fancybox({
'showCloseButton': true,
'href' : 'link.html',
'width' : 500,
'height' : 350,
'type' : 'iframe'
});
});
link.html文件是:
<a onclick="window.open(this.href,'','resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=400,height=500,left=350,top=250,status'); return false" href="http://www.test.com"><img src="test-simotas.jpg" width="447" height="314"/></a>
我找不到解决办法
你知道吗??提前感谢。也许这会奏效:
<a
onclick="window.open(this.['data-href'],
'','resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,
toolbar=no,fullscreen=no,dependent=no,width=400,height=500,left=350,
top=250,status'); return false" data-href="http://www.test.com"
href="javascript:return false;">
谢谢,它很管用,但我不得不改变:
<a onclick="window.open(this.['data-href'],'','resizable=yes,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,fullscreen=no,dependent=no,width=400,height=500,left=350,top=250,status'); return false" data-href="http://www.simotas.gr" href="http://test.com" target="_blank"><img src="test-simotas.jpg" width="447" height="314"/></a>
谢谢,它能工作,但我不得不这样更改“href=”“target=“\u blank”>