Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | DOM lastModified Property

Improve Article
Save Article
  • Last Updated : 08 Jul, 2022
Improve Article
Save Article

The DOM lastModified property in HTML is used to return the date and time of the current document that was last modified. This property is read-only. This property returns a string which contains the date and time when the document was last modified. 





<!DOCTYPE html>
      DOM lastModified Property
<body style="text-align:center">
    <h1 style="color:green;">
            DOM lastModified Property
    <button onclick="geeks()">
    <p id="sudo"></p>
        /* Function to use lastModified property */
        function geeks() {
            var x = document.lastModified;
            document.getElementById("sudo").innerHTML = x;



Supported Browsers: The browser supported by DOM lastModified Property are listed below:

  • Google Chrome 1
  • Edge 12
  • Internet Explorer 4
  • Firefox 1
  • Opera 12.1
  • Safari 1
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!