JavaScript method to get the last modification time of the current page
- 2020-05-26 07:44:18
- OfStack
The example in this article shows how JavaScript can get the last modification time of a current web page. Share with you for your reference. The details are as follows:
The JS code below outputs the last modification time of the current page, using the document.lastModified property
<!DOCTYPE html>
<html>
<body>
This document was last modified on:
<script>
document.write(document.lastModified);
</script>
</body>
</html>
The operation effect is as follows:
This document was last modified on: 04/03/2015 02:42:22
I hope this article has been helpful to your javascript programming.