HTML5微信长按图片不会弹出菜单的解决方法
https://segmentfault.com/q/1010000005088048
"contextmenu"事件,可以禁止长按的事件。
<div ontouchstart = "return false;" id="t"> 测试div </div>
也是可以的
<style type="text/css">
*:not(input):not(textarea) {
-webkit-user-select: none; /* disable selection/Copy of UIWebView */
-webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
}
</style>
If you want disable only anchor button tag use this:
a {
-webkit-user-select: none; /* disable selection/Copy of UIWebView */
-webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */
}
能解决IOS上的问题,但Android上长按还是会有菜单