Manca l'iterazione, poi ci sono errori di logica (il bg va cambiato anche se (inc<bgimages.length-1) e di sintassi:
...('tbIndex').style.backgroundImage=bgimages[inc];
deve essere
...('tbIndex').style.backgroundImage='url(\''+bgim ages[inc]+'\')';
codice:var inc=-1; var t; function bgSlide(){ if (inc<bgimages.length-1){ inc=inc+1; }else{ inc=0; } var path='url(\''+bgimages[inc]+'\')'; document.getElementById('tbIndex').style.backgroundImage=path; t=setTimeout('bgSlide()',3000); } window.onload=function(){ bgSlide(); }

Rispondi quotando
