Especial Seguridad
Especial Seguridad
En esta sección te dejamos códigos muy utiles al momento de resguardar el contenido de tu sitio web. Para darte más seguridad. Es imposible que tu sitio sea antirobos de contenido 100% pero estos codigos te ayudaran.
Deshabilitar click derecho
Deshabilitar click derecho (Sin mensaje)
<!-- www.cssplantillas.es.tl --> <script language="JavaScript"> function click() { if (event.button==2) { alert('Aquí el mensaje'); } } function keypresed() { alert('Teclado Desabilitado'); } document.onkeydown=keypresed; document.onmousedown=click; </script>
Deshabilitar click derecho y teclado
<!-- www.cssplantillas.es.tl --> <script language="JavaScript"> function click() { if (event.button==2) { alert('Aquí el mensaje'); } } function keypresed() { alert('Teclado Desabilitado'); } document.onkeydown=keypresed; document.onmousedown=click;</script>
Evitar click derecho
<!-- www.cssplantillas.es.tl --> <script language="Javascript"> document.oncontextmenu = function(){return false} </script>
Evitar copia de textos
<!-- www.cssplantillas.es.tl --> <script type="text/javascript"> document.onselectstart=function(){ if (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password") return false else return true; }; if (window.sidebar){ document.onmousedown=function(e){ var obj=e.target; if (obj.tagName.toUpperCase() == "INPUT" || obj.tagName.toUpperCase() == "TEXTAREA" || obj.tagName.toUpperCase() == "PASSWORD") return true; /*else if (obj.tagName=="BUTTON"){ return true; }*/ else return false; } }</script>
No permitir guardar imágenes
<!-- www.cssplantillas.es.tl --> <img src="URL DE TU IMAGEN" oncopy="alert('Opcion deshabilitada');return false" oncontextmenu="alert('Opcion deshabilitada');return false" />
No permitir ver "Código de fuente"
<!-- www.cssplantillas.es.tl --> <Script language=JavaScript> function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){ alert("Coloca el mensaje aquí."); return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("Coloca el mensaje aquí."); return false; } return true; } document.onmousedown=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; </script>
Evitar arrastrar y soltar
<!-- www.cssplantillas.es.tl --> <script language="Javascript"> document.ondragstart = function(){return false} </script>
Añadir comentario acerca de esta página:
Menu