链接在新标签中打开时如何保持当前窗口? [英] How to stay on current window when the link opens in new tab?

查看:67
本文介绍了链接在新标签中打开时如何保持当前窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户点击链接时

 < a href =http://www.stackoverflow.com目标= _空白 >点击< / A> 

有没有办法停留在当前窗口而不是去标签页?

解决方案


有没有办法保留在当前窗口而不是去标签[当链接<





$ p $只有你先做这样的事情...

  $('a [target =_ blank]')。removeAttr('target'); 


When a user clicks on a link

<a href="http://www.stackoverflow.com" target="_blank">click</a>

is there a way to stay on the current window instead of going to the tab ?

解决方案

Is there a way to stay on the current window instead of going to the tab [when the link has target="_blank"] ?

Only if you do something like this first...

$('a[target="_blank"]').removeAttr('target');

这篇关于链接在新标签中打开时如何保持当前窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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