使用php在新标签页中打开

时间:2017-10-13 09:29:16

标签: php tabs

当用户点击“查看大图”

时,我想以新的方式打开地图
'gmap'=>array(
                array(
                    '(https*:\/\/maps.google.co.in\/?[^< ]+)',
                    '<iframe width="'.qa_opt('embed_gmap_width').'" height="'.qa_opt('embed_gmap_height').'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="$1&amp;ie=UTF8&amp;output=embed"></iframe><br /><small><a href="$1&amp;ie=UTF8&amp;output=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>','gmap'
                )
            ),
        );

我应该在哪里放target="_blank

2 个答案:

答案 0 :(得分:2)

您应该将target="_blank"放在<a>标记内。 Reference

<a href="$1&amp;ie=UTF8&amp;output=embed" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a>

答案 1 :(得分:0)

最好在<a>标记中:

'<iframe width="'.qa_opt('embed_gmap_width').'" height="'.qa_opt('embed_gmap_height').'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="$1&amp;ie=UTF8&amp;output=embed"></iframe><br /><small><a href="$1&amp;ie=UTF8&amp;output=embed" style="color:#0000FF;text-align:left" target="_blank">View Larger Map</a></small>',