Chiedo a voi saggi : - D
Ho un bel script (Fra l'altro preso da html.it) il cui mi permette che ad un tot di secondi si visualizzi una frase diversa, ebbene tutto questo funziona! ma siccome io non me ne intendo di JS chiedo aiuto a voi, vorrei sostituire le frasi con delle immagini.
Codice PHP:
/* This script and many more are available free online at
The JavaScript Source!! [url]http://javascript.internet.com[/url]
Created by: Sandeep Gangadharan | [url]http://sivamdesign.com/scripts/[/url] */
var text = 0;
var message=new Array();
message[0] = "1frase"
message[1] = "Sezione Javascript"
message[2] = "Scaricate centinaia di script"
message[3] = "Arrivederci..."
function changeText() {
if (message.length > 0) {
document.change.descript.value=message[text];
text++;
}
if (text == 4) {text = 0; } // change the # 4 at the left to the maximum # of message lines you want included
window.setTimeout("changeText()", 3500); } // change the # on the left to adjust the speed of the
// scroll. The smaller the # the faster the speed
// Multiple onload function created by: Simon Willison
// [url]http://simon.incutio.com/archive/2004/05/26/addLoadEvent[/url]
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(function() {
changeText();
});
Le frasi da sostituire con eventuali immagini sono:
message[0] = "1frase"
message[1] = "Sezione Javascript"
message[2] = "Scaricate centinaia di script"
message[3] = "Arrivederci..."
Spero di essere stato chiaro, spero anche in una vostra risposta.