在Android浏览器上禁用图像下载

时间:2022-10-22 14:58:09

how do I disable the functionality on Android browsers where a user can press and hold and image and bring up a "save image" popup dialog.

如何禁用Android浏览器上的功能,用户可以按住该图像并保持图像并显示“保存图像”弹出对话框。

for ios devices, -webkit-touch-callout:none; works, but this seems to have no effect on android browsers

对于ios设备,-webkit-touch-callout:none;有效,但这似乎对Android浏览器没有影响

1 个解决方案

#1


0  

attach an event handler for the click event which calls event.preventDefault(). At least this did work for me when using ICS´ default web browser, chrome beta and opera mobile.

附加调用event.preventDefault()的click事件的事件处理程序。至少这对我来说在使用ICS的默认网络浏览器,Chrome测试版和Opera手机时都有用。

#1


0  

attach an event handler for the click event which calls event.preventDefault(). At least this did work for me when using ICS´ default web browser, chrome beta and opera mobile.

附加调用event.preventDefault()的click事件的事件处理程序。至少这对我来说在使用ICS的默认网络浏览器,Chrome测试版和Opera手机时都有用。