Bienvenido: ( Identificarse | Registrarse )      
Foros de Trucos Windows
 
Closed TopicStart new topicStart Poll

Outline · [ Estándar ] · Lineal+

> ayuda con javascript

siriguilla
post Feb 18 2008, 01:58 PM
Publicado: #1


Maestro
*****

Grupo: Members
Mensajes: 278
Registrado: 11-March 07
Miembro nº: 195.287



hola quiero hacer un script pero no encuentro ninguno por internet el script trata de que me ponga una imagen cada dia osea el lunes por ejemplo me ponga imagen1.jpg el martes imagen2.jpg me explico??
a ver si me podeis ayudar gracias

salu2


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Javi47008
post Feb 18 2008, 11:45 PM
Publicado: #2


Maestro Secreto
Group Icon

Grupo: Miembros Vitalicios
Mensajes: 816
Registrado: 1-October 04
Miembro nº: 22.469



Yo he encontrado este script; creo que es lo que buscas aunke pone que son imágenes con enlace:

Imagen del día (con vínculo).
JavaScript 1.2
Créditos: JavaScript-FX
Puedes configurar este script para mostrar una imagen distinta todos los días de la semana.

Instrucciones:

Copia el código y pégalo en el lugar donde quieres que se vea el script...

Seleccionar todo...

CODE
<script type="text/javascript" language="JavaScript">
 var now = new Date ();
 var day = now.getDay();

// Rutinas JavaScript
// RECUERDA QUE LA SEMANA EMPIEZA EN DOMINGO
if(day == 0) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='domingo'></a>");
if(day == 1) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='lunes'></a>");
if(day == 2) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='martes'></a>");
if(day == 3) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='miercoles'></a>");
if(day == 4) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='jueves'></a>");
if(day == 5) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='viernes'></a>");
if(day == 6) document.write("<a rel="nofollow" href='TU ENLACE AQUI'><img src='http://www.URL DE LA IMAGEN.com' alt='sabado'></a>");
</script>



User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
Closed TopicTopic OptionsStart new topic

Collapse

> Topicos similares

AYUDA CON MI PC lords 17 1 Hoy, 08:12 AM
By: Rommel_A
Ayuda Urgente tany23 51 5 Hoy, 04:42 AM
By: tany23
Me tumbaron mi server :(:(: ayuda danielpz 33 0 Hoy, 03:26 AM
By: danielpz
ayuda mi pc esta muy lento maryory15 203 6 Hoy, 01:43 AM
By: Caito