JavaScript method to display the last modification date of the current document

  • 2020-05-17 04:45:58
  • OfStack

This example shows how JavaScript displays the last modification date of the current document. Share with you for your reference. The specific implementation method is as follows:


<script language="Javascript">
<!--
var dateModified = document.lastModified;
mydate = dateModified.slice(0,10);
document.write("<b>Last updated: " + mydate + "</b>");
//-->
</script>

I hope this article has been helpful to your javascript programming.


Related articles: