http://newmiracle.cn/?p=1017

 

https://segmentfault.com/q/1010000005088048

"contextmenu"事件,可以禁止长按的事件。

https://stackoverflow.com/questions/12304012/preventing-default-context-menu-on-longpress-longclick-in-mobile-safari-ipad


<div ontouchstart = "return false;" > 测试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上长按还是会有菜单
 

相关文章: