How to get the last modified time of a HTML document using Javascript

Last modified time

document.lastModified returns the last modified time of the document. The return type is string.

Example


<!--  w  w  w.  j  a  va 2 s  .  c o m-->
<!DOCTYPE HTML> 
<html> 
    <body> 
        <script> 
            document.writeln(document.lastModified); 
        </script> 
    </body> 
</html>

Click to view the demo





















Home »
  Javascript »
    Javascript Reference »




Array
Canvas Context
CSSStyleDeclaration
CSSStyleSheet
Date
Document
Event
Global
History
HTMLElement
Input Element
Location
Math
Number
String
Window