现有目标选项卡上的window.open不会将其置于前台 [英] window.open on existing target tab does not bring it to foreground

查看:74
本文介绍了现有目标选项卡上的window.open不会将其置于前台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在特定目标上打开链接的网页,目标在新标签页中打开。如果我在打开链接后返回第一页并单击同一链接,则现有选项卡不是
带到前台 。是否有可能实现?




I have a web page with a link opening on a specific target, the target is opened in a new tab. If I return to the first page after opening the link and I click to the same link the existing tab is not brought to the foreground. Is it possible make it happen?


推荐答案

尝试

{

var win = window.open(url,'target');

var win=window.open(url, 'target');

win.focus( );

win.focus();

}

catch(e){

alert('你的弹出窗口拦截器已开启) ');

alert('your popup blocker is turned on');

}


这篇关于现有目标选项卡上的window.open不会将其置于前台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆