Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    script per alternare immagini a ogni refresh della pagina

    ciao!

    cerco un script che permetta di cambiare immagini (tra un gruppo da me scelte) a ogni refresh della pagina.

    esempio:
    in una pagina web ho un'img A, al refresh voglio che questa immagine venga sostituita da un'immagine B.
    refreshando ancora, volgio che ritorni l'immagine A.


    l'ho visto in alcuni siti, ma ignoro lo script, se è html o java..


    grazie per l'aiuto!
    l'enfer, c'est les autres

  2. #2
    nesssuno che abbai un'idea?
    l'enfer, c'est les autres

  3. #3
    Utente bannato
    Registrato dal
    Jun 2004
    Messaggi
    1,854
    beh molto probabilmente quello che hai visto è lato server.
    Comunque basta fare una select in base all'ora

  4. #4
    Originariamente inviato da rixx
    beh molto probabilmente quello che hai visto è lato server.
    Comunque basta fare una select in base all'ora
    scusa?
    l'enfer, c'est les autres

  5. #5
    Utente bannato
    Registrato dal
    Jun 2004
    Messaggi
    1,854
    tipo:
    if (now.getSeconds()==1){img.src='pippo0.gif'}
    if (now.getSeconds()==2){img.src='pippo1.gif'}
    if (now.getSeconds()==3){img.src='pippo2.gif'}
    if (now.getSeconds()==4){img.src='pippo3.gif'}
    if (now.getSeconds()==5){img.src='pippo4.gif'}
    if (now.getSeconds()==6){img.src='pippo5.gif'}
    if (now.getSeconds()==7){img.src='pippo6.gif'}
    if (now.getSeconds()==8){img.src='pippo7.gif'}
    if (now.getSeconds()==9){img.src='pippo8.gif'}

    simile lato server:
    <%
    Dim img
    if right(time,1)=1 then img="pippo0.gif" end if
    if right(time,1)=2 then img="pippo1.gif" end if
    if right(time,1)=3 then img="pippo2.gif" end if
    if right(time,1)=4 then img="pippo3.gif" end if
    if right(time,1)=5 then img="pippo4.gif" end if
    if right(time,1)=6 then img="pippo5.gif" end if
    ...
    %>

    [img]<%=img%>[/img]

    puoi anche limitare con maggior/minore.
    questo è un metodo semplice, oppure puoi usare la funzione rnd

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.