禁止所有內容:

<body ondragstart=”return false” onselectstart=”return false” onContextMenu=”return false”></body>

禁止另存圖片:

<script>
var clickmessage=”圖片不開放下載 謝謝”
function disableclick(e) {if (document.all) {if (event.button==2||event.button==3) {if (event.srcElement.tagName==”IMG”){alert(clickmessage);
return false;}}}if (document.layers) {if (e.which == 3) {alert(clickmessage);return false;}}}function associateimages(){for(i=0;i<document.images.length;i++)document.images.onmousedown=disableclick;}if (document.all)document.onmousedown=disableclick<br />
else if (document.layers)associateimages()</script>

 

%d 位部落客按了讚: