scrips
Encuentra aqui una gran variedad de de Códigos Javascript.
[Recuerda que algunos códigos no son compatibles con todos los navegadores]
Mensaje en la barra inferior <script language="JavaScript"> <!-- var yourwords = "Wedmaster te ayuda en tu Web"; var speed = 150; var control = 1; function flash() { if (control == 1) { window.status=yourwords; control=0; } else { window.status=""; control=1; } setTimeout("flash();",speed); } // --> </script> <-- Volver Arriba --> Mensaje Parpadeando en bara inferior de Texto <script language="JavaScript"> var CC_msg = "Wedmaster te ayuda..............."; var speed = 150; var control = 1; function flash() { if (control == 1) { window.status=CC_msg; control=0; } else { window.status=""; control=1; } setTimeout("flash();",speed); } </script> <-- Volver Arriba --> Mensaje con Movimiento en la Parte Superior <script LANGUAGE="JavaScript"> var txt="Wedmaster te ayuda."; var espera=30; var refresco=null; function rotulo_title() { document.title=txt; txt=txt.substring(1,txt.length)+txt.charAt(0); refresco=setTimeout("rotulo_title()",espera);} rotulo_title(); </script> <-- Volver Arriba --> Mensaje que Cambia de Color <SCRIPT language=JavaScript> <!-- function cambiaColor(colorfg){ document.fgColor = colorfg } function tiempo(){ setTimeout("cambiaColor('aqua')",1); setTimeout("cambiaColor('silver')", 1000); setTimeout("cambiaColor('lightyellow')", 3000); setTimeout("cambiaColor('lightgreen')", 5000); setTimeout("cambiaColor('orange')", 7000); setTimeout("cambiaColor('yellow')", 9000); setTimeout("tiempo()", 11000); } tiempo(); </script> <-- Volver Arriba --> Botones de Navegación <table border="0" bgcolor="#FFCC66"> <tr> <td align="center"> <input type="button" value=" << " onclick="javascript:window.history.go(-1);"> <input type="button" value="Top" onclick="document.location='#top';"> <input type="button" value=" >> " onclick="javascript:window.history.go(1);"></td> </tr> </table> <!-- End Navigation --> <-- Volver Arriba --> Mensaje de Cargando Página <body onLoad="esconde();"> <script language="JavaScript"> if(ie || ns) document.write('<div id="precarga" align="center"> <br />Esperen a que termine de cargar la página, por favor...</div>'); </script> <-- Volver Arriba --> Minimizar Pagina con un Boton <input type="button" value="Minimizar ventana" onclick="window.moveBy(5000,5000); min = 'si';" style="font-family:Verdana"><script>min = "no"; function volver(){if(min == "si"){window.moveTo(0,0); min = "no"}}; window.onfocus = volver </script> <style> .animado {position:absolute;visibility:visible;top:-50px;font-size:10pt;font-family:Arial;font-weight:bold;color:Blak;} </style> <-- Volver Arriba --> Probador de HTML <script> function probar(texto) { ventana = window.open('', 'popup', ''); ventana.document.write(texto); } </script> <form action="" name="probador"> <font face="Verdana" size="2">Esto es un probador de códigos, inserta el código HTML y te dará el resultado en una ventana nueva!<hr /> </font><textarea rows="10" cols="50" name="texto"></textarea><font face="Verdana" size="2"> <br /> </font><input type="button" onclick="probar(texto.value)" value="Convertir" /><font face="Verdana" size="2"> </font> </form> <-- Volver Arriba --> Tabla de colores en tu web <iframe name="window" src="http://paneles.impresionesweb.com/webmasters/colores.htm" width="500" height="350" marginwidth="0" scrolling="yes" frameborder="0"></iframe>
<-- Volver Arriba --> Fecha en tu sitio <!-- mydate = new Date(); myday = mydate.getDay(); mymonth = mydate.getMonth(); myweekday= mydate.getDate(); weekday= myweekday; if(myday == 0) day = " Domingo, " else if(myday == 1) day = " Lunes, " else if(myday == 2) day = " Martes, " else if(myday == 3) day = " Miércoles, " else if(myday == 4) day = " Jueves, " else if(myday == 5) day = " Viernes, " else if(myday == 6) day = " Sábado, " if(mymonth == 0) month = "Enero " else if(mymonth ==1) month = "Febrero " else if(mymonth ==2) month = "Marzo " else if(mymonth ==3) month = "Abril " else if(mymonth ==4) month = "Mayo " else if(mymonth ==5) month = "Junio " else if(mymonth ==6) month = "Julio " else if(mymonth ==7) month = "Agosto " else if(mymonth ==8) month = "Setiembre " else if(mymonth ==9) month = "Octubre " else if(mymonth ==10) month = "Noviembre " else if(mymonth ==11) month = "Diciembre " document.write("<font face=arial, size=1>"+ day); document.write(myweekday+" de "+month+ "</font>"); // --> </script> <-- Volver Arriba --> Saludo según la hora del día <Font size=2 face=arial><b> <Script Language="JavaScript"> <!-- today = new Date() if(today.getMinutes() < 10){ pad = "0"} else pad = ""; document.write ;if((today.getHours() >=6) && (today.getHours() <=9)){ document.write("¡Buen día!") } if((today.getHours() >=10) && (today.getHours() <=11)){ document.write("¡Buen día!") } if((today.getHours() >=12) && (today.getHours() <=19)){ document.write("¡Buenas tardes!") } if((today.getHours() >=20) && (today.getHours() <=23)){ document.write("¡Buenas noches!") } if((today.getHours() >=0) && (today.getHours() <=3)){ document.write("¡Buenas noches!") } if((today.getHours() >=4) && (today.getHours() <=5)){ document.write("¡Buenas noches!") } // --> </script> </b></font> <-- Volver Arriba --> Tiempo restante para finalizar el día <body> <p>Tiempo restante para finalizar el día</p> <form name="Reloj"> <input type="text" size="7" name="tiempo" value="mm:hh:ss" title="Tiempo restante para finalizar el día"> <script language="JavaScript"> <!-- var tiempoAtras; updateReloj(); tiempoAtras= (hora < 10) ? hora :hora; document.Reloj.tiempo.value = tiempoAtras; setTimeout("updateReloj()",1000); Redireccionar página <script>location='http://google.cl/'</script> <-- Volver Arriba --> Establecer como página de inicio
<A class=chlnk style="FONT-WEIGHT: bold; CURSOR: hand; COLOR: #004080; FONT-FAMILY: Verdana" onclick= "this.style.behavior='url(#default#homepage)'; this.setHomePage('http://www.CheNico.com');"> <FONT face=Arial color=#000000 size=-2><U> Esta parte del texto se puede modificar en el código</U></FONT></A> <-- Volver Arriba --> Centrar la web <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http:/www.w3.org/1999/xhtml"> <div style="width:900px; position: relative; margin-left: auto; margin-right: auto;"> <-- Volver Arriba --> Atras - Actualizar - Adelante
<input type="button" value="Atrás" onclick="history.back()" style="font-family: Verdana; font-size: 8 pt"> <input type="button" value="Actualizar" 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"> <-- Volver Arriba --> "Welcome" para poner en Inicio
Con link: <a href="Dirección de tu sitio"><img src="https://img.webme.com/pic/c/chatroh/8484484848484.gif" alt="Welcome" width="300" height="100" border="0" /></a> Sin link: <img src="https://img.webme.com/pic/c/chatroh/8484484848484.gif" alt="Welcome" width="300" height="100" border="0" /> <-- Volver Arriba --> Caja de código con botón Copiar <span id="Caja1" class="Caja1">Haga click dentro de la caja de texto para copiar su contenido<br /> </span> <textarea onclick="copyCaja1(document.getElementById('code1'));return false;" rows="3" cols="16" id="code1">EL TEXTO O CÓDIGO QUE DESEE QUE APAREZCA DENTRO DE LA CAJITA Nº1</textarea> <script> function copyCaja1(elt) { var urlSwf = "copy.swf"; var flash = document.getElementById("C1"); var divinfo = '<embed src="http://www.mygirlyspace.com/' + urlSwf + '" name="copy_swf" FlashVars="clipboard='+escape(elt.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>'; flash.innerHTML = divinfo; elt.focus(); elt.select(); document.getElementById("Caja1").innerHTML = "¡El texto ha sido copiado!<br/>"; return true; } </script> <div id="C1"> </div> pd. Si quieres colocar más de una caja en una sola página, escribe el mismo código reemplazando los 1 por 2. <-- Volver Arriba --> Hosted by PWG en la esquina inferior derecha de tu web <a href='http://paginawebgratis.es' style='display:scroll;position:fixed;bottom:0px;right:0px;'> <img src='http://img91.imageshack.us/img91/6165/hostedbyxj1.gif'/></a> <-- Volver Arriba --> Este código sirve para que aparezca NEW al lado de una página de tu menú. Lo colocan al final de tu título de la página. <img src="http://img441.imageshack.us/img441/5372/newyw7.gif" border="0"> <-- Volver Arriba --> Abrir web en Pop-up <script language='JavaScript'>window.open('http://www.chenico.com', 'geoflotante', '');</script> <-- Volver Arriba --> Recomendar página <form name="eMailer"> ENVÍA ESTA PÁGINA A UN AMIGO <br> Indica su e-mail: <br> <input type="text" name="address" size="25"> <br> <input type="button" value="Recomendá esta Web!" onClick="mailThisUrl();"> </form> <script language="JavaScript1.2"> var good; function checkEmailAddress(field) { // the following expression must be all on one line... var goodEmail = field.value.match(/b(^(S+@).+((.com)|(.net)| (.edu)|(.mil)|(.gov)|(.org)|(..{2,2}))$)b/gi); if (goodEmail){ good = true } else { alert('Por favor introduce un e-mail valido') field.focus() field.select() good = false } } u = window.location; m = "Pienso que te puede interesar esta página..."; function mailThisUrl(){ good = false checkEmailAddress(document.eMailer.address) if (good){ // the following expression must be all on one line... window.location = "mailto:"+document.eMailer.address.value+"?subject="+m+"&body="+document.title+" "+u; } } </script> <-- Volver Arriba --> Mensaje de alerta al intentar copiar <Script language=JavaScript> function right(e) { if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){ alert("ACA TU MENSAJE DE ALERTA."); return false; } else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) { alert("ACA TU MENSAJE DE ALERTA."); return false; } return true; } document.onmousedown=right; if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=right; </script> <-- Volver Arriba --> Mensaje de Bienvenida <script language="JavaScript"> alert("MODIFICAR TEXTO"); </script> <-- Volver Arriba --> Mensaje de despedida <script language="Javascript"> function goAway() { alert('TU MENSAJE DE DESPEDIDA'); } </script> <body bgcolor="white" onUnload="goAway()"> </body> <-- Volver Arriba --> |
Código: |
<form name="dynamicselector"> <table border="0" width="100%" cellspacing="0" cellpadding="0" height="178" summary=""> <tr> <td width="35%" valign="top" align="left"> <select name="dynamicselector2" size="4" onChange="generateimage(this.options[this.selectedIndex].value)"> <option value="URL IMAGEN">TEXTO</option> <option value="URL IMAGEN">TEXTO</option> <option value="URL IMAGEN">TEXTO</option> <option value="URL IMAGEN">TEXTO</option> <option value="URL IMAGEN">TEXTO</option> </select> <script> /* Dynamic Image selector Script- © Dynamic Drive (www.dynamicdrive.com) For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ function generateimage(which){ if (document.all){ dynamic3.innerHTML='<center>Loading image...</center>'; dynamic3.innerHTML='<img src="'+which+'">'; } else if (document.layers){ document.dynamic1.document.dynamic2.document.write('<img src="'+which+'">'); document.dynamic1.document.dynamic2.document.close(); } else alert('You need NS 4 or IE 4 to view the images!'); } </script> </td> <td width="65%" valign="top" align="left"><ilayer id="dynamic1" width="100%" height="178"><layer id="dynamic2" width="100%" height="178"><div id="dynamic3"></div></layer></ilayer></td> </tr> </table> </form> |
Solo introduzcan la url de la imagen donde lo indica
y el teto que deseen que aparezca donde lo indica
y lo colocan donde deseen que aparezca.
asi se veria:
Abrir ventana con efecto de corredera
bueno con este codigo que les dejo podran poner un link de texto
el cual al picar en el la ventana se abrira de forma corredera:
Código: |
<script LANGUAGE="JavaScript"> function janelanimada(endereco) { var velocidadev = 15; var topo = 0; var esquerda = 0; var velocidadeh = 15; if (document.all) { var tamlar = window.screen.availHeight - topo; var tamjan = window.screen.availWidth - esquerda; var tamanho = window.open("","","left=" + esquerda + ",top=" + topo + ",width=1,height=1,scrollbars=yes"); for (sizeheight = 1; sizeheight < tamlar; sizeheight += velocidadev) { tamanho.resizeTo("1",sizeheight );} for (sizewidth = 1; sizewidth < tamjan; sizewidth += velocidadeh) { tamanho.resizeTo(sizewidth+6,sizeheight );} tamanho.location = endereco;} else window.location = endereco;} </script> <p><a href="URL DEL SITE" onClick="janelanimada('URL DEL SITE');return false;">AQUI TEXTO QUE APARECERA</a><br> |
Solo coloquen la url del site donde lo indica
y el texto que deseen que aparezca en su web.
burbujas que salen del puntero:
bueno con este codigo saldran burbujas de su puntero:
Código: |
<script language="JavaScript"> <!-- Under Water Mouse Script by kurt.grigg@virgin.net Image0=new Image(); Image0.src="http://i33.tinypic.com/j9agqg.gif"; Amount=20; Ymouse=-50; Xmouse=-50; Ypos=new Array(); Xpos=new Array(); Speed=new Array(); rate=new Array(); grow=new Array(); Step=new Array(); Cstep=new Array(); nsSize=new Array(); ns=(document.layers)?1:0; WinHeight=(document.layers)?window.innerHeight:window.document.body.clientHeight; (document.layers)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ Ymouse=(document.layers)?evnt.pageY-20:event.y-20; Xmouse=(document.layers)?evnt.pageX:event.x; } (document.layers)?window.onMouseMove=Mouse:document.onmousemove=Mouse; for (i=0; i < Amount; i++){ Ypos[i]=Math.random()*WinHeight-Ymouse; Xpos[i]=Xmouse; Speed[i]=Math.random()*10+1; Cstep[i]=0; Step[i]=Math.random()*0.1+0.05; grow[i]=4; nsSize[i]=Math.random()*15+5; rate[i]=Math.random()*0.5+0.1; } if (ns){ for (i = 0; i < Amount; i++){ document.write("<LAYER NAME='sn"+i+"' LEFT=0 TOP=0><img src="+Image0.src+" name='N' width="+nsSize[i]+" height="+nsSize[i]+"></LAYER>"); } } else{ document.write('<div style="position:absolute;top:0px;left:0px"><div style="position:relative">'); for (i = 0; i < Amount; i++){ document.write('<img id="si" src="'+Image0.src+'" style="position:absolute;top:0px;left:0px;filter:alpha(opacity=90)">'); } document.write('</div></div>'); } function MouseBubbles(){ var hscrll=(document.layers)?window.pageYOffset:document.body.scrollTop; var wscrll=(document.layers)?window.pageXOffset:document.body.scrollLeft; for (i=0; i < Amount; i++){ sy = Speed[i]*Math.sin(270*Math.PI/180); sx = Speed[i]*Math.cos(Cstep[i]*5); Ypos[i]+=sy; Xpos[i]+=sx; if (Ypos[i] < -40){ Ypos[i]=Ymouse; Xpos[i]=Xmouse; Speed[i]= 6+Math.random()*3; grow[i]=4; nsSize[i]=Math.random()*15+5; } if (ns){ document.layers['sn'+i].left=Xpos[i]+wscrll; document.layers['sn'+i].top=Ypos[i]+hscrll; } else{ si[i].style.pixelLeft=Xpos[i]+wscrll; si[i].style.pixelTop=Ypos[i]+hscrll; si[i].style.width=grow[i]; si[i].style.height=grow[i]; } grow[i]+=rate[i]; Cstep[i]+=Step[i]; if (grow[i] > 24) grow[i]=25; } setTimeout('MouseBubbles()',10); } MouseBubbles(); //--> </script> |
bueno aqui les dejo una imagen de como se veria:
pongan el codigo en texto por debajo de la pagina y listo.
CODIGOS
Texto en forma de montaña rusa.
Ejemplo: http://www.cyberiapc.com/aascripter/samples/TextEffects/sub1.htm
Funciona en:
Código: |
<script> /* Roller Coaster Script- By Website Abstraction Over 200+ free scripts here! */ var fs=1 var direction="right" function rollertext(whichone){ var thetext=whichone for (i=0;i<thetext.length;i++){ document.write(thetext.charAt(i).fontsize(fs)) if (fs<7&&direction=="right") fs++ else if (fs==7){ direction="left" fs-- } else if (fs==1){ direction="right" fs++ } else if (fs>1&&direction=="left") fs-- } } //Change below text to your won rollertext("Life is like a roller coaster ride. Hang on tight!") </script> |
Texto marquesina dentro de un formulario
Ejemplo: http://www.cyberiapc.com/aascripter/samples/TextEffects/sub7.htm
Funciona en:
este dentro de las etiquetas <HEAD> Y </HEAD>
Código: |
<script language="JavaScript"> <!-- Hide the script from non-JavaScript browsers -- // This script was found at the JavaScript Place. http://www.javaplace.co.uk var timerID = null; var timerRunning = false; var id,pause=0,position=0; function ticker() { var i,k,msg=" Your important and interesting messages go here .......... "; k=(75/msg.length)+1; for(i=0;i<=k;i++) msg+=" "+msg; document.form2.ticker.value=msg.substring(position,position+100); if(position++==38) position=0; id=setTimeout("ticker()",1000/10); } function action() { if(!pause) { clearTimeout(id); pause=1; } else { ticker(); pause=0; } } // --End hiding script from non-JavaScript browsers --> </script> |
y Este dentro de las etiquetas <BODY> Y </BODY>
Código: |
<BODY onLoad="ticker ()"> <CENTER><H3>Ticker Tape scrolling message demo</H3></CENTER> <P> <FORM NAME="form2"> <INPUT TYPE="text" name="ticker" size="82"> </FORM> <P> Back to the <A HREF="index.html">index</A> page |
Presentacion de Imagenes cambiandolas con un boton
Ejemplo: http://www.cyberiapc.com/aascripter/samples/ImageSound/sub3.htm
Funciona en:
Código: |
<table border="0" cellpadding="0"> <caption><strong>Air Show Photos</strong></caption> <tr> <td width="100%"><img src="plane1.gif" width="300" height="240" name="photoslider"></td> </tr> <tr> <td width="100%"><form method="POST" name="rotater"> <div align="center"><center><p><script language="JavaScript1.1"> var photos=new Array() var which=0 /*Change the below variables to reference your own images. You may have as many images in the slider as you wish*/ photos[0]="plane1.gif" photos[1]="plane2.gif" photos[2]="plane3.gif" photos[3]="plane4.gif" photos[4]="plane5.gif" function backward(){ if (which>0){ window.status='' which-- document.images.photoslider.src=photos[which] } } function forward(){ if (which<photos.length-1){ which++ document.images.photoslider.src=photos[which] } else window.status='End of gallery' } </script><input type="button" value="<<Back" name="B2" onClick="backward()"> <input type="button" value="Next>>" name="B1" onClick="forward()"><br> <a href="#" onClick="which=1;backward();return false"><small>Start Over</small></a></p> </center></div> </form> </td> </tr> </table> |
Imagen aleatoria de fondo al cargar la pagina
Ejemplo: http://www.cyberiapc.com/aascripter/samples/ImageSound/sub1.htm
Funciona en:
Código: |
<script> /*Random Background Image- By Website Abstraction (www.wsabstract.com) More free JavaScripts here! */ var backgr1="../clip/backgr4.jpg" var backgr2="../clip/backgr17.jpg" var backgr3="../clip/backgr13.jpg" var cur=Math.round(6*Math.random()) if (cur<=1) backgr=backgr1 else if (cur<=4) backgr=backgr2 else backgr=backgr3 document.write('<body background="'+backgr+'" bgcolor="#FFFFFF">') </script> |
Seleccion de imagen con un formilario deslisante
Ejemplo: http://www.cyberiapc.com/aascripter/samples/ImageSound/sub6.htm
Funciona en:
entre las etiquetas <HEAD> Y </HEAD>
Código: |
<script language="javascript"> <!-- /*Combo Box Image Selector: By Website Abstraction (www.wsabstract.com) Over 200+ free JavaScript here! */ function showimage() { if (!document.images) return document.images.pictures.src= document.mygallery.picture.options[document.mygallery.picture.selectedIndex].value } //--> </script> |
Entre las etiquetas <BODY> Y </BODY>
Código: |
<table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"><form name="mygallery"><p><select name="picture" size="1" onChange="showimage()"> <option selected value="me.gif">Picture of me</option> <option value="myaunt.gif">Picture of my aunt</option> <option value="brother.gif">Picture of my brother</option> </select></p> </form> </td> </tr> <tr> <td width="100%"><p align="center"><img src="me.gif" name="pictures" width="99" height="100"></td> </tr> </table> |
Scroll de ventana asia avajo
Ejemplo: http://www.cyberiapc.com/aascripter/samples/Browser/sub1.htm
Funciona en:
Entre las etiquietas <BODY> Y </BODY>
Código: |
<script language="JavaScript1.2"> /* Top-Down scrolling window Script- © Dynamic Drive (www.dynamicdrive.com) For full source code, installation instructions, 100's more free DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ //change 1 to another integer to alter the scroll speed. Greater is faster var speed=1 var currentpos=0,alt=1,curpos1=0,curpos2=-1 function initialize(){ startit() } function scrollwindow(){ if (document.all) temp=document.body.scrollTop else temp=window.pageYOffset if (alt==0) alt=1 else alt=0 if (alt==0) curpos1=temp else curpos2=temp if (curpos1!=curpos2){ if (document.all) currentpos=document.body.scrollTop+speed else currentpos=window.pageYOffset+speed window.scroll(0,currentpos) } else{ currentpos=0 window.scroll(0,currentpos) } } function startit(){ setInterval("scrollwindow()",10) } window.onload=initialize </script> |
Mini venta que corre por toda la pantalla (con pagina personalisable)
Ejemplo: http://www.cyberiapc.com/aascripter/samples/Browser/sub14.htm
Funciona en:
Entre las etiquetas <HEAD> Y </HEAD>
Código: |
<Script Language="JavaScript1.2"> <!-- Hiding /* Java Script by Lefteris Haritou 5/05/1997 http://www.geocities.com/SiliconValley/7096 Please do not remove the above credit ! No copyrights, but just be fair */ var x=0; var y=0; var plus=1; function start(){ nw=window.open("","wd","scrolbar=0,toolbar=0,status=0"); window.nw.resizeTo(200,100); window.nw.moveTo(0,0) nw.document.open(); nw.document.writeln('<HTML><BODY onBlur="self.focus()" Bgcolor="#FFFFF0"><CENTER><BR><font face="Arial" color="#0000FF" size=4>Cool New Features Of Netscape 4</font></CENTER></BODY></HTML>'); nw.document.close(); gvar(); } function earthquake(){ window.nw.moveBy(x,y); gvar(); } function gvar(){ if (plus==1){ if (x<35){ x+=1; window.setTimeout("earthquake()",200); } else{ if (y<29){ y+=1; window.setTimeout("earthquake()",200); } else{ plus=0; x=0; y=0; gvar(); } } } else{ if (x>-35){ x-=1; window.setTimeout("earthquake()",200); } else{ if (y>-29){ y-=1; window.setTimeout("earthquake()",200); } else{ fine(); } } } } function gvarm(){ if (y>0){ y-=1; window.setTimeout("earthquake()",200); } else{ if (x>0){ x-=1; window.setTimeout("earthquake()",200); } else{ fine(); } } } function fine(){ alert("Demo presented to you by Lefteris Haritou n http://www.geocities.com/~lef"); nw.close(); clearTimeout(); } // Done Hiding --> </Script> |
Entre las Etiquetas <BODY> Y </BODY>
Código: |
<CENTER> <Form> <Input type="button" Value="Begin" onclick="start()"> </Form> </CENTER> |
Efecto de texto 3D (no imagen)
Ejemplo: http://www.cyberiapc.com/aascripter/samples/TextEffects/sub9.htm
Funciona en:
Código: |
<!----------------- PLEASE ATTACH THIS IF USED --------------> <meta name=author content="Raul R. Edwards"> <meta name=copyright content="Software Angel, Inc. (c) April 1, 1999"> <meta license=GNU content="GNU General Public License Version 1.2 as published by the Free Software Foundation" <!-----------------------------------------------------------> <style> body { background:silver; font-family:Arrus BT,Garamond,Times New Roman; } div { position:absolute; } </style> <title>Emboss & 3D Letters</title> <head> <body> Written by<br> <style> a { text-decoration: none; color:maroon; vlink:maroon; alink:red;} a:hover {color: red } .info { font-family:Times New Roman; positon:relative;} .light { top:-1; left:-1; color:white;} .shade { top:+1; left:+1; color:pink; } .fill { top:0; left:0; color:red; } </style> <div class="info"> <div class="light"> <i>Software Angel, Inc.</i> </div> <div class="shade"> <i>Software Angel, Inc.</i> </div> <div class="fill"> <i> <a href="mailto:rre@scs.howard.edu" onmouseover="status='Software Angel, Inc. © 1999'; return true;" onmouseout="status='Emboss & 3D Letters'; return true;"> Software Angel, Inc.</a> </i> </div> </div> <br><br><br> <!--- Example #1 ---> <style> .shade1 { top:+5; left:+5; color:black; } .fill1 { top:0; left:0; color:red; } </style> <div class=Example1> <div class="shade1"> <center><h1>Shadow</h1></center> </div> <div class="fill1"> <center><h1>Shadow</h1></center> </div> </div> <br><br><br> <!--- Example #2 ---> <style> .light2 { top:-1; left:-2; color:white; } .shade2 { top:+1; left:+2; color:black; } .fill2 { top:0; left:0; color:silver; } </style> <div class=Example2> <div class="light2"> <center><h1>Emboss Background Example</h1></center> </div> <div class="shade2"> <center><h1>Emboss Background Example</h1></center> </div> <div class="fill2"> <center><h1>Emboss Background Example</h1></center> </div> </div> <br><br><br> <!--- Example #3 ---> <style> .light3 { top:-2; left:-2; color:white; } .shade3 { top:+2; left:+2; color:lightblue; } .fill3 { top:0; left:0; color:blue; } </style> <div class=Example3> <div class="light3"> <center><h1>Emboss Color Example</h1></center> </div> <div class="shade3"> <center><h1>Emboss Color Example</h1></center> </div> <div class="fill3"> <center><h1>Emboss Color Example</h1></center> </div> </div> <br><br><br> <!--- Example #4 ---> <style> .light4 { top:-2; left:-2; color:yellow; } .shade4 { top:+2; left:+2; color:yellow; } .fill4 { top:0; left:0; color:darkgreen; } </style> <div class=Example4> <div class="light4"> <center><h1>Color Highlight Example</h1></center> </div> <div class="shade4"> <center><h1>Color Highlight Example</h1></center> </div> <div class="fill4"> <center><h1>Color Highlight Example</h1></center> </div> </div> |
Texto en grande que salta por toda la pantalla
Ejemplo: http://www.cyberiapc.com/aascripter/samples/TextEffects/sub12.htm
Funciona en:
entre las etiquetas <BODY> Y </BODY>
Código: |
<style type="text/css"> #supertext { position:absolute; left:0; top:0; visibility:hide; visibility:hidden; } </style> <script language="JavaScript1.2"> /* Bouncy message script- By Dynamicdrive.com Code based on Lloyd Hassell's, at http://www.dynamicdrive.com/dynamicindex4/bounceimage.htm For full source, TOS, and 100s DTHML scripts, visit http://dynamicdrive.com */ //Configure the below three variables //1) Set message to display (HTML accepted) var thecontent='<h2><font color="#0000FF">Welcome to Dynamic Drive!</font></h2>' //2) Set delay after which message should be hidden, in miliseconds ('' makes it incessantly visible on the screen) var hidetimer=''; //3) Set speed of animation (1-50), where larger is faster var BallSpeed = 20; ///NO NEED TO EDIT BELOW THIS LINE/////////// var contentWidth; var contentHeight; var maxBallSpeed = 50; var xMax; var yMax; var xPos = 0; var yPos = 0; var xDir = 'right'; var yDir = 'down'; var superballRunning = true; var tempBallSpeed; var currentBallSrc; var newXDir; var newYDir; function initializeBall() { if (document.all) { xMax = document.body.clientWidth yMax = document.body.clientHeight document.all("supertext").style.visibility = "visible"; contentWidth=supertext.offsetWidth contentHeight=supertext.offsetHeight } else if (document.layers) { xMax = window.innerWidth; yMax = window.innerHeight; contentWidth=document.supertext.document.width contentHeight=document.supertext.document.height document.layers["supertext"].visibility = "show"; } setTimeout('moveBall()',400); if (hidetimer!='') setTimeout("hidetext()",hidetimer) } function moveBall() { if (superballRunning == true) { calculatePosition(); if (document.all) { document.all("supertext").style.left = xPos + document.body.scrollLeft; document.all("supertext").style.top = yPos + document.body.scrollTop; } else if (document.layers) { document.layers["supertext"].left = xPos + pageXOffset; document.layers["supertext"].top = yPos + pageYOffset; } animatetext=setTimeout('moveBall()',20); } } function calculatePosition() { if (xDir == "right") { if (xPos > (xMax - contentWidth - BallSpeed)) { xDir = "left"; } } else if (xDir == "left") { if (xPos < (0 + BallSpeed)) { xDir = "right"; } } if (yDir == "down") { if (yPos > (yMax - contentHeight - BallSpeed)) { yDir = "up"; } } else if (yDir == "up") { if (yPos < (0 + BallSpeed)) { yDir = "down"; } } if (xDir == "right") { xPos = xPos + BallSpeed; } else if (xDir == "left") { xPos = xPos - BallSpeed; } else { xPos = xPos; } if (yDir == "down") { yPos = yPos + BallSpeed; } else if (yDir == "up") { yPos = yPos - BallSpeed; } else { yPos = yPos; } } function hidetext(){ if (document.all) supertext.style.visibility="hidden" else if (document.layers) document.supertext.visibility="hide" clearTimeout(animatetext) } if (document.all||document.layers){ document.write('<span id="supertext"><nobr>'+thecontent+'</nobr></span>') window.onload = initializeBall; window.onresize = new Function("window.location.reload()"); } </script> |
Efecto texto en desvanesimiento con scroll (muy bueno)
Ejemplo: http://www.cyberiapc.com/aascripter/samples/TextEffects/sub15.htm
Funciona en:
entre las etiquetas <HEAD> Y </HEAD>
Código: |
<style TYPE="text/css"> <!-- .TextScrollStyle { visibility:hidden; font-family:Verdana; font-weight:bold; text-align:center; padding:0; margin:0; width:100%; overflow:hidden; } --> </style> <script language="JavaScript1.2"> /* Dynamic Fader Script (updated: 00/08/05) Created and submitted by Nicholas Poh (hwinmain@yahoo.com) to Dynamicdrive.com Key modifications by Dynamic Drive for stability/ efficiency in NS For full source code, usage terms, and 100s more scripts, visit http://dynamicdrive.com */ //1) Configure messages: var TS_message = new Array(); TS_message[0] = '<div align="left">Hello there</div>'; TS_message[1] = '<div align="left">Wow... hope you like it!</div>'; TS_message[2] = '<div align="left">Script downloaded from <A HREF="http://www.cyberiapc.com">CyberiaPC.com</A></div>'; //2) Configure fader width and colors: var TS_scrollwidth=400 //configure fader width var TS_colorFG = 0x000000; // Text color var TS_colorBG = 0xFFFFFF; //bgColor // uncomment any value you wanted to change //var TS_ymax = 50; // How many pixel to move //var TS_ystep = 1; // 1 or -1 only (Scroll direction) //var TS_speed = 2; // The smaller the value the faster //var TS_pause = 100; // Pause time(milisecond) between messages var TS_fadestep= 20; // Steps to fade in and out if (document.all) document.write('<style>#containerarea{width:'+TS_scrollwidth+'}</style >') </script> |
Entre las etiquetas <BODY> Y </BODY>
Código: |
<DIV id="containerarea"> <SCRIPT LANGUAGE="JavaScript1.2" SRC="textfader.js"></SCRIPT> </DIV> |