jsp页面中让图片不能下载怎么设置他的属性?

来源:百度知道 编辑:UC知道 时间:2024/06/18 15:08:42
jsp页面中让图片不能下载怎么设置他的属性?使得页面上的图片无法下载到本地机器
在一个页面有很多的图片,只让部分的图片不能够下载,怎么解决,不要屏蔽右键呢?

用javascript做 屏蔽右键就是了

<script language="JavaScript">
<!--

if (window.Event)
document.captureEvents(Event.MOUSEUP);

function nocontextmenu()
{
event.cancelBubble = true
event.returnValue = false;

return false;
}

function norightclick(e)
{
if (window.Event)
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}

document.oncontextmenu = nocontextmenu; //对ie5.0以上
document.onmousedown = norightclick; //对其它浏览器
//-->
</script>
<script language="JavaScript">
<!--
function MM_displayStatusMsg(msgStr) { //v1.0
status=msgStr;
document.MM_returnValue = true;
}
//-->
</scrip