且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

获取html文件的最后修改日期

更新时间:2023-01-29 19:41:54

使用 document.lastModified Javascript属性。 >

quirksmode有一个很好的功能来格式化日期: http://www.quirksmode.org/js/lastmod.html


how can i figure out the last modified date of a html file im importing into my web app?

The html file is on another server and different users can make updates, when i retrieve the page i want to be able see when it was last updated so i can label the updated date on my homepage. I

Use the document.lastModified Javascript property.

quirksmode has a nice function to format the date too: http://www.quirksmode.org/js/lastmod.html