Home > Web Front-end > JS Tutorial > JavaScript outputs the last updated time of a file in a specified format_javascript skills

JavaScript outputs the last updated time of a file in a specified format_javascript skills

WBOY
Release: 2016-05-16 19:09:28
Original
1106 people have browsed it

This function is mainly obtained based on document.lastModified, and then simply processed.


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute
]

Note: lastMod.getYear( )<200?(lastMod.getYear() 1900, this code is written for compatibility with ff, if not written, the year 2006 will be displayed as 106.

The display effect is as follows:
Last update:2006-6-28 16:43:25
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template