Update 最終更新日

〔注1〕jsファイルと呼び出すファイルの文字コードを同じにする。

〔注2〕Opera, Chrome, Safariでは正しく表示されない。

   Firefox, IE7, SeaMonkeyでは正しく表示される。

〔例1〕
<script language="javascript">
document.write("Last Updated : ",document.lastModified);
</script>
〔例2〕
update = new Date(document.lastModified)
theMonth = update.getMonth() + 1
theDate = update.getDate()
theYear = update.getYear()
if (navigator.appName == "Netscape") {
       theYear = theYear + 1900
    }
    if (navigator.appName == "Opera") {
       theYear = theYear + 1900
    }
document.writeln("最終更新日:" + theYear + "年" + theMonth + "月" + theDate + "日")

コメントを投稿