ALTRE VERSIONI:
| ITALIA | GRAN BRETAGNA | FRANCIA | GERMANIA | SPAGNA |
| ITALIA SMALL | G.B. SMALL | FRANCIA SMALL | GERMANIA SMALL | SPAGNA SMALL |
| ITALIA LARGE | G.B. LARGE | FRANCIA LARGE | GERMANIA LARGE | SPAGNA LARGE |
Il colore dello sfondo del calendario è identico al colore della pagina: CCFFFF ed è sostituibile con uno a vostro piacimento.
AUTORE: http://www.ScriptBreaker.com modified from www.webmasterpaolo.com
RITORNA ALLA PAGINA DELLE JAVASCRIPT
RITORNA ALLA PAGINA DEGLI OROLOGI E DATARI
utenti connessi
Lo script da inserire in html:
<!-- Free JavaScripts at http://www.ScriptBreaker.com -->
<html>
<body>
<script language = javascript>
var now = new Date();
var month_array = new Array("gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre");
document.write("<form name=date_list><table bgcolor=green><tr><td>");
document.write("<select name=month onchange=change_month(this.options.selectedIndex)>");
for(i=0;i<month_array.length;i++)
{
if (now.getMonth() != i)
{document.write ("<option value="+i+">"+month_array[i]);}
else
{document.write ("<option value="+i+" selected>"+month_array[i]);}
}
document.write("</select>");
document.write("</td><td>");
document.write ("<select name=year onchange=change_year(this.options[this.options.selectedIndex])>");
for(i=2000;i<2100;i++)
{
if (now.getFullYear() != i)
{document.write("<option value="+i+">"+i);}
else
{document.write("<option value="+i+" selected>"+i);}
}
document.write("</select></td></tr><tr><td colspan=2><center>");
document.write("<table bgcolor=white border=0 cellspacing = 0 cellpading = 0 width=100% ><tr bgcolor=green align=center>");
document.write("<td><font color=white>L</font></td><td><font color=white>M</td><td><font color=white>M</td><td><font color=white>G</td><td><font color=white>V</td><td ><font color=white>S</td><td ><font color=white>D</td>");
document.write("</tr><tr>");
for(j=0;j<6;j++)
{
for(i=0;i<7;i++)
{
document.write("<td align=center><div id=d"+i+"r"+j+"></div></td>")
}
document.write("</tr>");
}
document.write("</table>");
document.write("</center></from></td></tr></table>");
var show_date = new Date();
function set_cal(show_date)
{
begin_day = new Date (show_date.getFullYear(),show_date.getMonth());
begin_day_date = begin_day.getDay();
end_day = new Date (show_date.getFullYear(),show_date.getMonth()+1);
count_day = (end_day - begin_day)/1000/60/60/24;
if (begin_day.getMonth() == 2) count_day = 31;
else
if (begin_day.getMonth() == 9) count_day = 31;
input_table(begin_day_date,count_day);
}
set_cal(show_date);
function input_table(begin,count)
{
init();
j=0;
if (begin!=0){i=begin-1;}else{i=6;}
for (c=1;c<count+1;c++)
{
colum_name = "d"+i+"r"+j;
colum_name = document.getElementById(colum_name);
if ((now.getDate() == c)&&(show_date.getMonth() == now.getMonth())&&(show_date.getFullYear() == now.getFullYear())) {colum_name.style.backgroundColor = "blue";colum_name.style.color = "white";}
colum_name.innerHTML = c;
i++;
if (i==7){i=0;j++;}
}
after_init();
}
function init()
{
for(j=0;j<6;j++)
{
for(i=0;i<7;i++)
{
colum_name = "d"+i+"r"+j;
colum_name = document.getElementById(colum_name);
colum_name.innerHTML = "-";
colum_name.style.backgroundColor ="ccffff";
colum_name.style.color ="black";
}
}
}
function after_init()
{
for(j=0;j<6;j++)
{
for(i=0;i<7;i++)
{
colum_name = "d"+i+"r"+j;
colum_name = document.getElementById(colum_name);
if (colum_name.innerHTML == "-")
{
colum_name.style.color ="white";
}
}
}
}
function change_month(sel_month)
{
show_date = new Date(show_date.getFullYear(),sel_month,1);
set_cal(show_date);
}
function change_year(sel_year)
{
sel_year = sel_year.value;
show_date = new Date(sel_year,show_date.getMonth(),1);
set_cal(show_date);
}
</script>
</html>
<!-- end Source -->