如何在jquery中启用右键单击? [英] How can I enable right click in jquery?

查看:74
本文介绍了如何在jquery中启用右键单击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我得到了这个jquery min的javascript文件,它阻止了我页面中的右键单击功能.我不知道在哪里重新启用右键单击功能,我搜索了整个代码,什么也没有: 我搜索过的第一行是这样的:

So I got this jquery min javascript file and it is blocking the right-click feature in my page. I've got no idea where to re-enable the right click feature, I've searched the whole code and nothing: The first line I've searched at was this:

var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;

https://jsfiddle.net/fpfwu02z/

推荐答案

问题不可能是jQuery,因为jQuery不会执行任何此类操作.

The problem could not be jQuery, because jQuery does not do any such thing.

您应该在某处放置另一个代码块,这可能会阻止contextmenu事件的默认操作,如下所示,将其删除即可,您应该没事

You should have another block of code somewhere which might be preventing the default action of the contextmenu event like below, remove that and you should be fine

$(document).on('contextmenu',function (e) {
    e.preventDefault();
})

这篇关于如何在jquery中启用右键单击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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