lastModified property is used to get the date and time when the document is last modified.
- <html>
- <body>
- <script type="text/javascript">
- document.write(document.lastModified);
- </script>
- </body>
- </html>
Output:


DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · JavaScriptLearn .NET, C#, and JavaScript: A Complete Beginner’s ProgrammingDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Join the conversation! Your thoughts help the community grow.