如何禁用浏览器中的“在新标签页中打开链接”? [英] How to disable the 'Open Link in New Tab' in the browser?

查看:174
本文介绍了如何禁用浏览器中的“在新标签页中打开链接”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在浏览器的右键菜单中禁用/删除在新标签页中打开链接选项?
如果使用javascript等无法做到这一点,那么有没有办法修改当用户点击此链接时会发生什么,例如,显示警告或阻止加载选项卡..?

How do I disable/remove the 'Open Link in New Tab' option in the right-click menu of the browser? If this is not possible with javascript etc then is there a way to modify what happens when the user clicks on this link, for example, display an alert or prevent the tab from loading..?

推荐答案

现在已经解决了主要问题,因为事实证明只需将href的查询字符串传递给ajax功能。

Have solved the main issue now, quite easily as it turned out just by passing the query string of the href to an ajax function.

我可能应该在我的问题中解释我想要的只是作为临时措施。无论如何,感谢所有评论。

I probably should have explained in my question that what I wanted was intended only as a temporary measure. Anyway thanks for all the comments.

这篇关于如何禁用浏览器中的“在新标签页中打开链接”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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