Block Context Menu

//Version 1 - Simplificada document.oncontextmenu = function() { return false; } //Version 2 - Simplificada en Body //<body oncontextmenu='return false; ' onkeydown='return false; '> //Version 3 - Bloqueo con mensaje document.oncontextmenu = function(){ return false; } function right(e){ var msg = "Prohibido usar el click derecho"; if(navigator.appName == 'Microsoft Internet Explorer' && event.button==2){ alert(msg); } }
Este snippet permite bloquear el context menu para evitar robo de imagenes o manipulacion de los elementos del DOM a traves de algunas herramientas de los navegadores.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.