〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
<SCRIPT LANGUAGE="JavaScript">
<!--
date = new Date();
tmp = new Date();
m = tmp.getMonth();

tmp.setDate(1);
document.write("<TABLE BORDER=2 CELLPADDING=4>");
document.write("<TR><TH COLSPAN=7 BGCOLOR=\"#0066cc\"><FONT COLOR=\"#ffffff\">" + tmp.getFullYear() + "/" + (tmp.getMonth() + 1) + "</FONT></TH></TR>");//bgcolor=年月欄の背景色
document.write("<TR BGCOLOR=\"#99ccff\">");//年月のカラー
document.write("<TD ALIGN=\"center\"><FONT COLOR=\"#ff0000\">日</FONT></TD>");//日曜日のカラー
document.write("<TD ALIGN=\"center\"><FONT>月</FONT></TD>");
document.write("<TD ALIGN=\"center\"><FONT>火</FONT></TD>");
document.write("<TD ALIGN=\"center\"><FONT>水</FONT></TD>");
document.write("<TD ALIGN=\"center\"><FONT>木</FONT></TD>");
document.write("<TD ALIGN=\"center\"><FONT>金</FONT></TD>");
document.write("<TD ALIGN=\"center\"><FONT COLOR=\"#ffff00\">土</FONT></TD>");//土曜日のカラー
document.write("</TR>");

for (i = 0; i < tmp.getDay(); i++) { document.write("<TD BGCOLOR=\"#cccccc\"><br></TD>"); }//前半の空白の背景カラー
while (m == tmp.getMonth()) {
if (tmp.getDay() == 0) { document.write("</TR><TR>"); }
if (tmp.getDate() == date.getDate()) {
document.write("<TD ALIGN=\"center\" BGCOLOR=\"#ffcc00\">" + tmp.getDate() + "</FONT></TD>");//今日の背景色
} else {
document.write("<TD ALIGN=\"center\">" + tmp.getDate() + "</FONT></TD>");
}
tmp.setTime(tmp.getTime() + 24 * 3600 * 1000);
}
if (tmp.getDay() != 0) {
for (i = 0; i < 7 - tmp.getDay(); i++) { document.write("<TD BGCOLOR=\"#cccccc\"><br></TD>"); }//後半の空白の背景色
}

document.write("</TR>");
document.write("</TABLE>");
// -->
</SCRIPT>

〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜

上記部分を</body>の直前に貼り付けます。

残念ながら「日にちの文字色の指定が解りません、依って背景が黒ですと文字が見えなくなりまーーーすm(_ _)m」





                         終わりでーーーす


   
自動的に今日の年月日を表示する「javascript」です
更新日時
 スガ