Home > Web Front-end > JS Tutorial > body text

js displays time js displays last modified time_javascript skills

WBOY
Release: 2016-05-16 17:44:41
Original
1203 people have browsed it

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:







Related labels:
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