Home >Web Front-end >JS Tutorial >js displays time js displays last modified time_javascript skills

js displays time js displays last modified time_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:44:411231browse

This example will display the last modification time of web page files. First, I added a text box control to the page, then used javascript to create a function, called the lastModified property of the document object in the function, and then displayed the last modified time of the file in the text box of the page. This method can be viewed The page update time.
Implementation process:
1. Write a custom function, the code is as follows:

Copy code The code is as follows:



2. Add the page HTML code and call the alterdate() function in the onLoad event of the body. The code is as follows:
Copy code The code is as follows:




This file was last modified:







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