gpt4 book ai didi

jQuery Mobile taphold 事件触发浏览器对话框

转载 作者:行者123 更新时间:2023-11-30 04:32:47 24 4
gpt4 key购买 nike

我遇到了 taphold 事件的问题。

我将 taphold 事件绑定(bind)到图像。当我即时点击图像时,Android 网络浏览器会触发一个对话框,其中包含“另存为图像”、“设置为墙纸”、“共享图像”命令。

我想在使用 taphold 事件时禁用图像处理命令对话框。

这可能吗?

最佳答案

我发现您必须禁用右键单击。

$(function(){

document.oncontextmenu = function() {return false;};

$(document).mousedown(function(e){

if ( e.button == 2 )
{
alert('Right mouse button!');
return false;
}

return true;
});
});

关于jQuery Mobile taphold 事件触发浏览器对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7399588/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com