Tuesday, April 26, 2016

Disable Right Click on Images

// copy and paste this script inside your body section OR contentplaceholder

<script>

document.oncontextmenu = function(e){
var target = (typeof e !="undefined")? e.target: event.srcElement
if (target.tagName == "IMG" || (target.tagName == 'A' && target.firstChild.tagName == 'IMG'))
return false
}

</script>

No comments: