开发者

Disable Image Save option by right click option [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Duplicates:

prevent saving image from my site

Transparent <div> to prevent right-click, Save As

Hi guys is there any way to disable image "save","copy","save as" option by right click user mouse.Because i don't want any one 开发者_运维问答to save my images.There are some scripts are available but they are not valid for all browsers.Any help which should be valid for all type browsers.


It's pointless to try to do this. If the browser can display the image then the user can also download it. You may be best off putting a watermark on the images.


You could always put a div over the image element, that way the right click will be invoked against the div instead of the image and therefore no "Save As".

<div class="image">
<div class="covering"></div>
<img src="..." />
</div>

<style>
.image
{
position:relative;
}

.covering
{
position:absolute;
width:100%;
height:100%;
z-index:2;
}


theres no way for doing it.. but using an empty gif (transparent method) you can prevent newbies from saving the real images


Use

oncontextmenu="return false;"

Will disable the context menu when right clicked on image.

But wont stop the user downloading the image by direclty typing the url or taking a screen shot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜