Home >Web Front-end >JS Tutorial >JavaScript method to get the last modification time of the current web page_javascript skills

JavaScript method to get the last modification time of the current web page_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:05:511477browse

The example in this article describes the method of using JavaScript to obtain the last modification time of the current web page. Share it with everyone for your reference. The details are as follows:

The following JS code outputs the last modification time of the current web page, using the document.lastModified attribute

<!DOCTYPE html>
<html>
<body>
This document was last modified on:
<script>
document.write(document.lastModified);
</script>
</body>
</html>

The operation effect is as follows:

This document was last modified on: 04/03/2015 02:42:22

I hope this article will be helpful to everyone’s JavaScript programming design.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn