Javascript Reference - HTML DOM lastModified Property








The lastModified property returns the date and time the current document was last modified.

Syntax

document.lastModified

Browser Support

lastModified Yes Yes Yes Yes Yes

Example

The following code shows how to get the date and time the document was last modified.


<!DOCTYPE html>
<html>
<body>
<!--  w  w  w  .ja  v  a2  s.  c o m-->
<script>
document.write(document.lastModified);
</script>

</body>
</html>

The code above is rendered as follows: