本文介绍了如何陷阱“在新标签页中打开”点击jquery.click的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个jquery脚本,它将click事件附加到每个链接,在单击链接时运行操作。这一直很有效,但我得到了一些反对意见,这些反馈让我感到沮丧。

I have a jquery script that attaches a click event to every link, running an action when the link is clicked. This has been working great, but I just got some betatester feedback that's foiling me.

用户右键单击链接并在新选项卡中打开它。当她这样做时,jquery没有捕获点击。坏用户。我用cmd-click再现了这个。

The user was right-clicking on the link and opening it in a new tab. When she did this, jquery didn't trap the click. BAD USER. I reproduced this with cmd-click as well.

有没有办法捕捉这些手势,或者这是一个固有的限制?

Is there a way to trap these gestures, or this an inherent limitation?

推荐答案

所以你想捕获每一次点击?事件正确还是中间? 不应该这样做吗?

So you want to capture every click? Event the right or middle one? Shouldn't the mousedown event do just that?

当然,她可以右键单击复制链接位置链接...

Of course, she could right click a link just to "Copy Link Location"...

这篇关于如何陷阱“在新标签页中打开”点击jquery.click的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 14:10