.post-body:first-letter { float:left; color: #333333; font-size:100px; font-family:none; line-height:80px; padding-top:1px; padding-right:5px; } font-style: italic; } span.letracapital{ float: left; font-size: 40px; line-height: 35px; /* Dobla el alto de linea menos 1 pixel */ font-family: Georgia, "Times New Roman", Times, serif; color: #2583ad; /* Azul */ padding-right: 5px; } -->

Recent Posts

Bloquear botón derecho con mensaje

13 may 2016

Este es un script, para poder bloquear el botón derecho del ratón con una alerta.



Como siempre nos vamos a Diseño- Añadir un gadget- 
HTML/JavaScript y añadimos este código.

<script  language='JavaScript'  type='text/JavaScript'>
var tenth='';function ninth() {
if (document.all) {(tenth);alert("Block"); return false;}}
function twelfth(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(tenth);return false;}}}
if (document.layers) {document.captureEvents(Eve nt.MOUSEDOWN);document.onmousedown=twelfth;}
else{document.onmouseup=twelfth;document.oncontextmenu=ninth;}
document.oncontextmenu=new Function('alert("
YOUR RIGHT CLICK ALERT MESSAGE HERE!!"); return false')
</script>


Cambiamos lo rojo por lo que queramos decir en el cuadro.


No hay comentarios:

Publicar un comentario

Deja tu comentario y en breve te contestaremos