aldoup Posted February 20, 2008 Report Share Posted February 20, 2008 Bueno amigos.. con mi hermoso tiempo aqui les traigo codigos javascriper: Porsia esto lo ire actualizando :D 1-para agregar a favoritos <a href="java script:window.external.AddFavorite('http://www.nombredetuweb.com','Tema de mi sitio')"/></a>agrégame a tus favoritos 2-para imprimir <a href="java script:print()">Imprimir</a> 3-Bloquear boton derecho <script language="JavaScript" type="text/JavaScript"> function click(){ if(event.button==2){ alert(' Tu modificas este alerta'); } } document.onmousedown=click //--> </script> 4-para que se aga pagina de inicio tu web <a href="http://www.elnombredetuweb.com" onclick="this.style.behavior='url(#default#homepage)'; this.setHomePage('Esta es mi Página');">Haz click aqui</a> 5-saludo cuando uno entra a tu pagina <script language="JavaScript"> alert("este texto es el que modificas"); </script> 6-cuando fue tu ultima visita <script language="JavaScript" type="text/JavaScript"> <!-- readCookie(); function readCookie() { if (document.cookie == "") { writeCookie(); alertMessage(); } else { var the_cookie = document.cookie; the_cookie = unescape(the_cookie); the_cookie_split = the_cookie.split(";"); for (loop=0;loop<the_cookie_split.length;loop++) { var part_of_split = the_cookie_split[loop]; var find_name = part_of_split.indexOf("nfti_date") if (find_name!=-1) { break; } // Close if } // Close for if (find_name==-1) { writeCookie(); } else { var date_split = part_of_split.split("="); var last = date_split[1]; last=fixTheDate(last); alert (" - Bienvenido - Tu última visita a esta página fue: "+last); writeCookie(); } // Close if (find_name==-1) } } // Close function readCookie() function writeCookie() { var today = new Date(); var the_date = new Date("December 31, 2023"); var the_cookie_date = the_date.toGMTString(); var the_cookie = "nfti_date="+escape(today); var the_cookie = the_cookie + ";expires=" + the_cookie_date; document.cookie=the_cookie } function alertMessage(){ alert ("Bienvenido\aquí agregas un mensaje de bienvenida.") } function fixTheDate(date) { var split = date.split(" "); var fix_the_time = split[3].split(":") var hours = fix_the_time[0] if (hours>=12) { var ampm="PM" } else { var ampm="AM" } if (hours > 12) { hours = hours-12 } var new_time = hours+":"+fix_the_time[1]+" "+ampm var new_date = split[0]+" "+split[1]+", "+split[2]+" at "+new_time+", "+split[5] return new_date; } //--> </script> 7- reloj digital <span id="liveclock" style="position:absolute;left:0;top:0;"></span><script language="JavaScript" type="text/JavaScript"> <!-- function show5(){ if (!document.layers&&!document.all&&!document.getElementById) return var Digital=new Date() var hours=Digital.getHours() var minutes=Digital.getMinutes() var seconds=Digital.getSeconds() var dn="PM" if (hours<12) dn="AM" if (hours>12) hours=hours-12 if (hours==0) hours=12 if (minutes<=9) minutes="0"+minutes if (seconds<=9) seconds="0"+seconds //change font size here to your desire myclock="<font size='5' face='Arial' ><b><font size='1'>Hora actual:</font></br>"+hours+":"+minutes+":" +seconds+" "+dn+"</b></font>" if (document.layers){ document.layers.liveclock.document.write(myclock) document.layers.liveclock.document.close() } else if (document.all) liveclock.innerHTML=myclock else if (document.getElementById) document.getElementById("liveclock").innerHTML=myclock setTimeout("show5()",1000) } window.onload=show5 //--> </script> 8-fondo que cambia de color continuamente xD <script language="JavaScript" type="text/JavaScript"> <!-- //aqui modificas el color del efecto r=255; g=255; b=255; flag=0; t=new Array; o=new Array; d=new Array; function hex(a,c) { t[a]=Math.floor(c/16) o[a]=c%16 switch (t[a]) { case 10: t[a]='A'; break; case 11: t[a]='B'; break; case 12: t[a]='C'; break; case 13: t[a]='D'; break; case 14: t[a]='E'; break; case 15: t[a]='F'; break; default: break; } switch (o[a]) { case 10: o[a]='A'; break; case 11: o[a]='B'; break; case 12: o[a]='C'; break; case 13: o[a]='D'; break; case 14: o[a]='E'; break; case 15: o[a]='F'; break; default: break; } } function ran(a,c) { if ((Math.random()>2/3||c==0)&&c<255) { c++ d[a]=2; } else { if ((Math.random()<=1/2||c==255)&&c>0) { c-- d[a]=1; } else d[a]=0; } return c } function do_it(a,c) { if ((d[a]==2&&c<255)||c==0) { c++ d[a]=2 } else if ((d[a]==1&&c>0)||c==255) { c--; d[a]=1; } if (a==3) { if (d[1]==0&&d[2]==0&&d[3]==0) flag=1 } return c } function disco() { if (flag==0) { r=ran(1, r); g=ran(2, g); b=ran(3, b); hex(1,r) hex(2,g) hex(3,b) document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3] flag=50 } else { r=do_it(1, r) g=do_it(2,g) b=do_it(3,b) hex(1,r) hex(2,g) hex(3,b) document.bgColor="#"+t[1]+o[1]+t[2]+o[2]+t[3]+o[3] flag-- } if (document.all) setTimeout('disco()',50) } //--> </script> Fuentes:mundojavascriper Link to comment Share on other sites More sharing options...
ESFAXOR Posted February 20, 2008 Report Share Posted February 20, 2008 Saludos- lo moveré a donde corresponde. Tutoriales & Herramientas para Webmasters Espero que sigas actualizando ;) y que pongas códigos más novedosos. siga aportando compadre. Bienvenido a Chile(Palabra Censurada).org :sipis: Link to comment Share on other sites More sharing options...
.XiinoX. Posted February 20, 2008 Report Share Posted February 20, 2008 Se agradese la del saludo la ocupe para mi blog. Gracias :cool: Link to comment Share on other sites More sharing options...
aldoup Posted February 21, 2008 Author Report Share Posted February 21, 2008 si no saven como ponerlos... dejen su duda y yo les digo como :D Link to comment Share on other sites More sharing options...
eduardon Posted February 21, 2008 Report Share Posted February 21, 2008 oye comos e usa no caxo onde se ponen :D soy nab xD Link to comment Share on other sites More sharing options...
Holic Posted February 21, 2008 Report Share Posted February 21, 2008 wena man, gracias Link to comment Share on other sites More sharing options...
aldoup Posted February 21, 2008 Author Report Share Posted February 21, 2008 oye comos e usa no caxo onde se ponen :D soy nab xD mira para ponerlos teni que ir a tu web... i poner en alguna parte que diga codigos copia el codigo que quieres y lo pones (acuerdate de cambiar algunas cosas de los codigos, como aqui va tu web y todo eso) :D Link to comment Share on other sites More sharing options...
tkregister Posted February 25, 2008 Report Share Posted February 25, 2008 gracias por los script, no se como se ponen, pero a aprender se ha dicho Link to comment Share on other sites More sharing options...
factorxyz Posted March 8, 2008 Report Share Posted March 8, 2008 muy buenos scripts ojala pongas mas .... Link to comment Share on other sites More sharing options...
twostrike Posted April 28, 2008 Report Share Posted April 28, 2008 oye brother vale por el aporte podrias subri mas? de ante mano te agradezco Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now