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

    cambio backgruond su tabella

    Ciao Raga

    chiedevo se e' possibile cambiare a tempo lo sfondo (background) di una tabella con varie immagini creando un effetto tipo Banner

    grazie!!!
    ciuzz

  2. #2
    Utente di HTML.it L'avatar di v2v2
    Registrato dal
    Sep 2002
    Messaggi
    221

    fammi capire...

    ...tu hai 1 tab, X img e vuoi alternare lo sfondo di una cella della tab con le X img?

    giusto
    Only the good die young
    all the evil seem to live forever

    :metallica

  3. #3
    Utente di HTML.it L'avatar di v2v2
    Registrato dal
    Sep 2002
    Messaggi
    221
    prova così se ho intuito il problema:
    codice:
    <html> 
    <head> 
    <script>
    var max=3;	//numero di img
    
    function cambia(){
    c=document.getElementById("banner").style.backgroundImage;
    d=parseInt(c.charAt(4));
    d=(d<max) ? (d+1) : (d=1);
    c="url("+d+".jpg)";
    document.getElementById("banner").style.backgroundImage=c;
    
    setTimeout('cambia()',1500);
    }
    </script>
    </head> 
    <body onLoad="setTimeout('cambia()',1500)"> 
    
    <table border="1">
    <tr>
    <td id="banner" width="100" height="400" style="background-image:url(1.jpg)"></td>
    </tr>
    </table>
    
    </body> 
    </html>
    Le X img le devi numerare da 1 a max
    Only the good die young
    all the evil seem to live forever

    :metallica

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 © 2025 vBulletin Solutions, Inc. All rights reserved.