Aquí les dejaré varios códigos muy útiles para el blog, No todos funcionan en para los dos navegadores :(

No permite utilizar el botón derecho y no aparece nada (ni alert, etc)

HTML:
  1. <script language=”Javascript”> <!-- Begin document.oncontextmenu = function(){return false} // End --> </script>

No permite seleccionar el contenido de una página

JavaScript:
  1. <script language="Javascript"> <!-- Begin function disableselect(e){ return false } function reEnable(){ return true } document.onselectstart=new Function ("return false") if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } // End --> </script>


Código JavaScript para que aparezca un alert al utilizar el botón derecho

JavaScript:
  1. <script language="JavaScript"> <!-- Begin function right(e) { var msg = " [AQUI TU MENSAJE] "; if (navigator.appName == 'Netscape' &&amp;amp; e.which == 3) { alert(msg); // Delete this line to disable but not alert user return false; } else if (navigator.appName == 'Microsoft Internet Explorer' &&amp;amp; event.button==2) { alert(msg); // Delete this line to disable but not alert user return false; } return true; } document.onmousedown = right; // End --> </script>

Añadir a Favoritos

JavaScript:
  1. <script language="JavaScript"> <!-- function addBookmark() { if (window.external) external.AddFavorite("url de tu web", "nombre de tu web") else alert("Tu navegador no soporta esta caracteristica"); } // --> </script>

Varias frases o texto desplanzadose por el status

HTML:
  1. <html> <head> <script> <!-- var ShowString = " " //La primera linea tiene que estar en blanco + "Aquí la frase 1 " //Puedes añadir mas frases, aparte de estas 3 + "Aquí la frase 2 " + "Aquí la frase 3 " + "Ejemplo de otra frase A " var ShowWidth = 100 var ShowHead = 0 var ShowTail = ShowWidth var ShowLength = ShowString.length function Marquee () { var DisplayString if (ShowHead <displaystring =" ShowString.substring(ShowHead," displaystring =" ShowString.substring(ShowHead," showhead =" (ShowHead" showtail =" (ShowTail" status =" DisplayString" timerid =" setTimeout("> </script> </head> <body onload="Marquee()"> </body> </html>

Botón Atrás, Actualizar y Adelante

JavaScript:
  1. <input type="button" value="Atrás" onclick="history.back()" style="font-family: Verdana; font-size: 8 pt"/> <input type="button" value="ActuAalizar" onclick="window.location.reload()" style="font-family: Verdana; font-size: 8 pt"/> <input type="button" value="Adelante" onclick="history.forward()" style="font-family: Verdana; font-size: 8 pt"/>

Cambiar el puntero por uno personalizado

HTML:
  1. <!-- en el style --> BODY { cursor:url(URL DE CURSOR); } <!-- Elegir un puntero a nuestro gusto y guardar como cursor.cur -->

Cambiar el puntero

HTML:
  1. <!-- en un enlace --> <a href="#" style="cursor:help">enlace</a> <!-- saldrá el puntero de ayuda con un interrogante :) -->

Rotación banners (permite poner tantos banners como quieras, permite definir texto, imagen origen, link de destino, alto y anchura de imagen)

JavaScript:
  1. Cita:
  2. <script language="JavaScript"> <!-- Begin var how_many_ads = 3; var now = new Date() var sec = now.getSeconds() var ad = sec % how_many_ads; ad +=1; if (ad==1) { txt="TEXTO QUE PONDRAS"; url="URL DEL WEB"; alt="NOMBRE DEL WEB"; banner="URL DEL BANNER"; width="MEDIDA"; height="MEDIDA"; } if (ad==2) { txt="SOBRE LA WEB"; url="URL DE LA WEB"; alt="NOMBRE DE LA WEB"A; banner="http://etc, etc"; width="MEDIDAS"; height="MEDIDAS"; } if (ad==3) { txt="SOBRE LA WEB"; url="URL DE LA WEB"; alt="NOMBRE DE LA WEB "; banner="http://URL DEL BANNER"; width="MEDIDAS"; height="MEDIDAS"; } document.write('<center>'); document.write('<a href="\" target="\">'); document.write('<img src="\" width="')" height="'" alt="\" border="0" /><br />'); document.write('<small>' + txt + '</small>'); document.write(''); // End --> </script>

Banner aleatorio

JavaScript:
  1. <script language="JavaScript"> <!-- Hide this script from old browsers -- function create() { this.width = '' this.height = '' this.src = '' this.href = '' this.border = '' this.mouseover = '' } function random(n) { var js_mult1=3141 var js_mult2=5821 var js_m1=100000000 var js_m2=10000 var js_iseed=0 var js_iseed1=0 var js_iseed2=0 if (js_iseed == 0) { now = new Date() js_iseed = now.getHours() + now.getMinutes() * 60 + now.getSeconds() * 3600 } js_iseed1 = js_iseed / js_m2 js_iseed2 = js_iseed % js_m2 var tmp = (((js_iseed2 * js_mult1 + js_iseed1 * js_mult2) % js_m2) * js_m2 + (js_iseed2 * js_mult2)) % js_m1 js_iseed = (tmp + 1) % js_m1 return (Math.floor((js_iseed/js_m1) * n)) } var numberOfAds = 3 //number or ads you want to display ads = new Array() for(var i=1; i<=numberOfAds; i++) { ads[i] = new create() } ads[1].width = "468" ads[1].height = "60" ads[1].src = "http://www.txemaweb.com/imagenes/b-txwe2.gif" ads[1].href = "http://www.txemaweb.com" ads[1].border = "0" ads[1].mouseover = "Ven a TxemaWeb.com" ads[2].width = "MEDIDA" ads[2].height =A "MEDIDA" ads[2].src = "URL DEL BANNER" ads[2].href = "URL DE LA WEB" ads[2].border = "MEDIDA DEL BORDER" ads[2].mouseover = "SOBRE LA WEB" var n = random(numberOfAds) n = (n==0) ? n+1 : n n = (n> numberOfAds) ? n-numberOfAds : n var image = ads[n] var ad = "" ad += '<a href="' + image.href + '" onmouseover="self.status=\'' + image.mouseover + '\'\;return true" onmouseout="self.status=\'\'"> \n' ad += '<img src="' + image.src + '" width="'" height="'" border="'" /></a>' // -- End Hiding Here --> </script>

Un texto va siguiendo el puntero del ratón

HTML:
  1. <html> <head> <style> .spanstyle { position:absolute; visibility:visible; top:-50px; font-size:9pt; font-family:Tahoma; font-weight:bold; color:blue; } </style> <script> var x,y var step=20 var flag=0 // Tienes que dejar un espacio al final de tu mensaje!!!!! var message="Tu mensaje va aqui... " message=message.split("") var xpos=new Array() for (i=0;i<=message.length-1;i++) { xpos[i]=-50 } var ypos=new Array() for (i=0;i<=message.length-1;i++) { ypos[i]=-50 } function handlerMM(e){ x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX y = (document.layers)A ? e.pageY : document.body.scrollTop+event.clientY flag=1 } function makesnake() { if (flag==1 &&amp; document.all) { for (i=message.length-1; i>=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i<message .length-1; thisspan =" eval(" posleft="xpos[i]" postop="ypos[i]" flag="=" i="message.length-1;">=1; i--) { xpos[i]=xpos[i-1]+step ypos[i]=ypos[i-1] } xpos[0]=x+step ypos[0]=y for (i=0; i</message><message .length-1; thisspan =" eval(" left="xpos[i]" top="ypos[i]" timer="setTimeout("> </head> <body onload="makesnake()" style="width:100%;overflow-x:hidden;overflow-y:scroll"> </body> <script> <!-- Beginning of JavaScript - for (i=0;i<=message.length-1;i++) { document.write("<span id="'span" class="'spanstyle'">") document.write(message[i]) document.write("</span>") } if (document.layers){ document.captureEvents(Event.MOUSEMOVE); } document.onmousemove = handlerMM; // - End of JavaScript - --> </script> </html></message></message>


Si este Post te ayudó recuerda votar por el blog En esta Página
2 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 102 votes, average: 8.5 out of 10 (2 votos, promedio: 8.5 de 10)
Loading ... Loading ...

Post Relacionados
Pantones">Pantones
Como agregar Encuestas">Como agregar Encuestas
Juegos para Blog">Juegos para Blog
Categorias en Blogger">Categorias en Blogger
Accesorios para el Blog, Adornos, Cursores, Relojes">Accesorios para el Blog, Adornos, Cursores, Relojes


Post al Azar:





Imprime este Post Imprime este Post
Envía este Post Envía este Post