<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function get_daytime(){
myDate = new Date();
Y = myDate.getYear();
M = myDate.getMonth() + 1;
D = myDate.getDate();
hh = myDate.getHours();
mm = myDate.getMinutes();
ss = myDate.getSeconds();
alert("現在日時は、\n" + Y + "年" + M + "月" +
D + "日\n" + hh + "時" + mm + "分" + ss + "秒");
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<INPUT type="button" value="現在日時" onClick="get_daytime();">
</FORM>
</BODY>
</HTML>
|