Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在新窗口中从Iframe(fancybox)打开链接_Javascript_Jquery_Fancybox_Raphael - Fatal编程技术网

Javascript 在新窗口中从Iframe(fancybox)打开链接

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'

我正在使用fancybox弹出窗口用raphael脚本构建一幅欧洲地图,当单击country时,它会显示一个
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”>