Script Calendario - per siti/blog

« Older   Newer »
 
  Share  
.
  1. x.forzact™
        Like  
     
    .

    User deleted


    Siti con calendari da prelevare:

    qui
    qui
    qui


    questi indicati a titolo esemplificativo non sono gli unici siti ad avere calendari già pronti, ne esistono tanti tanti altri, basta interessarsi e cercare con Google...

    Flash Date Calendar è un widget calendario pronto per essere personalizzato ed aggiunto alle vostre pagine web. E’ possibile interagire con il componente cambiando il mese e l’anno usando le freccette.
    Inoltre passando il mouse sul giorno corrente, il widget mostra l’orario in formato digitale.

    Calendario sfondo grigio chiaro

    CODICE
    <!-- Inizio codice Calendario interattivo http://www.paginainizio.com -->
    <table border="0" cellpadding="0" cellspacing="0" id="AutoNumber1" width="190" height="160"><tr><td valign="top">
    <iframe width="190" height="160" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="no" scrolling="no" src="http://www.paginainizio.com/ajax/calendar/calenext.php">
    </iframe>


    Calendario modificabile

    CODICE
    <script type="text/javascript">setCal();
    function getTime(){var now=new Date(); var hour=now.getHours(); var minute=now.getMinutes(); now=null; var ampm=""; if(hour>=12){hour-=12; ampm="PM"} else ampm="AM"; hour=hour==0 ? 12 : hour; if(minute<10) minute="0"+minute; return hour+":"+minute+" "+ampm}
    function leapYear(year){return year % 4==0 ? true : false}
    function getDays(month,year){var x=new Array(31,(leapYear(year) ? 29 : 28),31,30,31,30,31,31,30,31,30,31); return x[month]}
    function getMonthName(month){var y=new Array("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"); return y[month]}
    function setCal(){var now=new Date(); var year=now.getFullYear(); var month=now.getMonth(); var monthName=getMonthName(month); var date=now.getDate(); now=null; var firstdayInstance=new Date(year,month,1); var firstday=firstdayInstance.getDay(); firstdayInstance=null; var days=getDays(month,year); drawCal(firstday+1, days, date, monthName, year)}

    function drawCal(firstday, lastDate, date, monthName, year) {
    var topHeight=20 // height of the table's top cell
    var border=4 // 3D height of table's border
    var cellspacing=3 // width of table's border
    var topColor="red" // color of table's top
    var topSize="+1" // size of tables top font
    var colWidth=30 // width of columns in table
    var dayCellHeight=15 // height of cells containing days of the week
    var dayColor="#FFD91C" // color of font representing week days
    var cellHeight=20 // height of cells representing dates in the calendar
    var todayColor="red" // color specifying today's date in the calendar
    var timeColor="black" // color of font representing current time
    var text=""
    text+='<table border='+border+' cellspacing='+cellspacing+'>' // table settings
    text+='<th colspan=7 height='+topHeight+'>' // create table top cell
    text+='<font face="verdana" color="'+topColor+'" size='+topSize+'>' // set font for table top
    text+=monthName+' '+year
    text+='</font>' // close table top's font settings
    text+='</th>' // close top cell

    var openCol='<td width='+colWidth+' height='+dayCellHeight+'>'; openCol+='<font face="verdana" color="'+dayColor+'">'; var closeCol='</font>'; var weekDay=new Array("Dom","Lun","Mar","Mer","Gio","Ven","Sab"); text+='<tr align="center" valign="center">'; for(var dayNum=0; dayNum<7; ++dayNum){text+=openCol+weekDay[dayNum]+closeCol} var digit=1; var curCell=1; for(var row=1; row<=Math.ceil((lastDate+firstday-1)/7); ++row){text+='<tr align="right" valign="top">'; for(var col=1; col<=7; ++col){if(digit>lastDate) break; if(curCell<firstday){text+='<td>'; curCell++} else{if(digit==date){text+='<td height='+cellHeight+'>'; text+='<b><font face="verdana" color="'+todayColor+'"></b>'; text+=digit; text+='</font><br>'; text+='<font face="verdana" color="'+timeColor+'" size="2">'; text+='</font>'} else text+='<td HEIGHT='+cellHeight+'><font face="verdana">'+digit+'</font>'; digit++}}} text+='</table>'; document.write(text)}</script>


    Calendario Winnie the pooh

    CODICE
    <iframe frameborder="0" src="http://www.kasiniste.com/calendario/calendario4.html" scrolling="no" width="150" height="250"></iframe>
    </center>

     
    .
0 replies since 17/8/2010, 11:31   797 views
  Share  
.