获取html文件的最后修改日期 [英] getting the last modified date of a html file

查看:1352
本文介绍了获取html文件的最后修改日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确定导入到我的网络应用程序的HTML文件的最后修改日期?



html文件位于另一台服务器上,不同的用户可以更新,当我检索页面,我想能够看到什么时候最后更新,所以我可以标记我的主页上的更新日期。我

解决方案

使用 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

这篇关于获取html文件的最后修改日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆