HTML DOM Document lastModified attribute
- Προηγούμενη σελίδα inputEncoding
- Επόμενη σελίδα links
- Επιστροφή στο προηγούμενο επίπεδο Τα Documents του HTML DOM
Definition and usage
lastModified
The property returns the date and time of the last modification of the document.
lastModified
The property is read-only.
Hint
The 'try it yourself' instance always returns the current date/time, because the document is created at runtime.
instance
Example 1
Get the date and time of the last modification of the document:
let text = document.lastModified;
Example 2
Convert the lastModified attribute to a date object:
const date = new Date(document.lastModified);
syntax
document.lastModified
return value
type | description |
---|---|
string | the date and time of the last modification of the document. |
browser supports
document.lastModified
Είναι χαρακτηριστικά DOM Level 3 (2004).
Όλοι οι περιηγητές υποστηρίζουν το:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Υποστήριξη | 9-11 | Υποστήριξη | Υποστήριξη | Υποστήριξη | Υποστήριξη |
- Προηγούμενη σελίδα inputEncoding
- Επόμενη σελίδα links
- Επιστροφή στο προηγούμενο επίπεδο Τα Documents του HTML DOM