年月日曜日付きスクローラー

 年月日曜日付きスクローラーです。スクロールメッセージは適当に書き換えて使用してください。


◆スクローラー
<SCRIPT Language="JavaScript"><!--
	stcnt = 0;
	msg = "Scroller with Timer (1 byte code only) ... 1996 program by K.Furuhata / OpenSpace ";
	blnk = "                                              ";
	str = blnk + blnk + msg;
function scroller()
{
	ct = new Date();
	h = "0"+ct.getHours();
	m = "0"+ct.getMinutes();
	s = "0"+ct.getSeconds();
	year = "0"+ct.getYear();
	month = "0"+(1+ct.getMonth());
	date = "0"+ct.getDate();
	days = ct.getDay();
	h = h.substring(h.length-2,h.length+1);
	m = m.substring(m.length-2,m.length+1);
	s = s.substring(s.length-2,s.length+1);
	year = year.substring(year.length-2,year.length+1);
	month = month.substring(month.length-2,month.length+1);
	date = date.substring(date.length-2,date.length+1);
	youbi = "日月火水木金土".substring(days*2,days*2+2)+"曜日】";
	cl = year+"年"+month+"月"+date+"日【"+youbi+":現在時刻 [ "+h+":"+m+":"+s+" ]  ";
	window.status = cl+str.substring(stcnt,str.length+1);
	stcnt>str.length ? stcnt=0 : stcnt++;
	timeID = window.setTimeout("scroller()",100);
}
// --></SCRIPT>