backt next

Displaying "Last Updated" Date on documents


<script language="JavaScript">
<!--
document.write("This page was last modified: ");
document.write(document.lastModified);
//-->
</script>


Output


I began my script with tag <script language="JavaScript">. The code is within <!-- and //--> tags. These tags should always be included to hide your code against older browser that does not support JavaScript.

lastModified is the property that gives date of document's last change.



Back to JavaScript homepage | Back | Next | Email me