Script Kalender

Untuk membuat kalender sendiri dan ditampilkan di web Anda, berikut ini adalah scriptnya dengan JavaScript.

Letakkan script ini di antara tag <head> …..script ini </head>

<script language=’JavaScript’ type=’text/JavaScript’>

var fifteenth = new Array(‘Sun’, ‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’);var sixteenth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);var seventeenth = new Date();var eighteenth = seventeenth.getMonth();var nineteenth = seventeenth.getDay();var first2 = seventeenth.getDate();var second2 = sixteenth[eighteenth]; if (eighteenth == 1) {  var third2 = seventeenth.getYear(); if (third2%4 == 0) second2 = 29;}document.write(“<table border=’0′ bgcolor=’ffD0F4′ cellspacing=’1′ cellpadding=’1′>”);document.write(‘<tr>’); for (var fourth2=0; fourth2<7; fourth2++) {  document.write(“<td width=’30’ height=’30’>”);  document.write(“<div align=’center’>” + fifteenth[fourth2] + “</div>”);  document.write(‘</td>’);}document.write(‘</tr>’);var fifth2 = 0;var sixth2 = 1;var fifteenth3 = nineteenth – first2%7 + 1; if (fifteenth3 < 0) fifteenth3 += 7;var sixteenth3 = parseInt((fifteenth3 + second2)/7); if ((fifteenth3 + second2)%7 != 0) sixteenth3++; for (var fourth2=sixteenth3; fourth2>0; fourth2–) {  document.write(‘<tr>’); for (var seventeenth3=7; seventeenth3>0; seventeenth3–) {    document.write(‘<td>’); if (fifth2<fifteenth3 || sixth2>second2) {      document.write(“<div align=’center’></div>”);      fifth2++;    } else { if (sixth2 == first2) document.write(“<div align=’center’><font color=’blue’>[” + sixth2 + “]</font></div>”); else document.write(“<div align=’center’>” + sixth2 + “</div>”);      sixth2++;    }    document.write(‘</td>’)  }  document.write(‘</tr>’);}document.write(‘</table>’); </script>

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: