Ingegna
a- a+

Scritta molto particolare

Non vi voglio anticipare niente...questo è lo script, relativo alla barra di stato, chepreferisco!!! :-)

Vi consiglio di provarlosubito!!!!

ESEMPIO

 

<html><head><title>Scritta molto particolare...</title><SCRIPT language=JavaScript>function initArray(){  this.length = initArray.arguments.length  for (var i = 0; i < this.length; i++)  this[i+1] = initArray.arguments[i]} function infoscroll(seed,looped){  var now = new Date();  var hours = now.getHours();  var minutes = now.getMinutes();  var seconds = now.getSeconds();  var year = now.getYear();  var month = now.getMonth();  var day = now.getDay();  var date = now.getDate();  var DOWArray = new initArray("Domenica" ,"Lunedì" ,"Martedì" ,"Mercoledì" ,"Giovedì" ,"Venerdì" ,"Sabato");  var MOYArray = new initArray("Gennaio" ,"Febbraio" ,"Marzo" ,"Aprile" ,"Maggio" ,"Giugno" ,"Luglio" ,"Agosto" ,"Settembre" ,"Ottobre" ,"Novembre" ,"Dicembre");  var timeValue = ((hours < 10) ? "0" : "") + hours  var text1  = "Benvenuti carissimi amici di WebMaster Point!!! Oggi è ";  var text2  =  DOWArray[day+1] + " ";  var putout = " ";  var c   = 1;   text2 = text2 + date + " ";  text2 = text2 + MOYArray[month+1] + " ";  if (navigator.appName == "Netscape")    {text2 = text2 + (year+1900) + " ...e sono le "}  else if (navigator.appName == "Microsoft Internet Explorer")    {text2 = text2 + (year) + " ...e sono le "}  timeValue += ((minutes < 10) ? ":0" : ":") + minutes  timeValue += ((seconds < 10) ? ":0" : ":") + seconds  timeValue += ((hours < 12) ? " A.M." : "")  text2  = text2 +  timeValue + "..........."  if (hours < 12)    {text2  = text2 + "Buongiorno!"}  else if (hours < 17)    {text2  = text2 + "Buon pomeriggio!"}  else    {text2  = text2 + "Buonasera!"}  text2 = text2 + "...Per qualsiasi problema scriveteci pure e risolveremo, nei limiti del possibile, i vostri problemi!!! ";  var msg=text1+text2;  if (seed > 100)  {     seed--;     var cmd="infoscroll(" + seed + " ," + looped + ")";     timerTwo=window.setTimeout(cmd,100);  }  else if (seed <= 100 && seed > 0)  {    for (c=0 ; c < seed ; c++)    {  putout+=" ";  }    putout+=msg.substring(0,100-seed);    seed--;    var cmd="infoscroll(" + seed + " ," + looped + ")";    window.status=putout;    timerTwo=window.setTimeout(cmd,100);  }  else if (seed <= 0)  {    if (-seed < msg.length)    {putout+=msg.substring(-seed,msg.length);seed--;var cmd="infoscroll(" + seed + " ," + looped + ")";window.status=putout;timerTwo=window.setTimeout(cmd,100);    }    else    {window.status=" ";looped += 1;var cmd = "infoscroll(100," + looped + ")";timerTwo=window.setTimeout(cmd,75);    }  }} // --> <!--infoscroll(100,1)// --></SCRIPT></head><body><h2>Osservate con attenzione la barra di stato...</h2></body></html>

 

Allora? Che ne pensate? Anche quisono bastate poche funzioni per creare uno script semplice,ma efficace! L'importante è inserire questo scriptall'interno del tag <head>.

Molti di voi avranno pensato diinserire data, ora, benvenuto in base all'ora e scrittain movimento, detto fatto...tutto in un unico script!