您现在的位置: 万盛学电脑网 >> 程序编程 >> 脚本专题 >> javascript >> 正文

JavaScript获取当前网页最后修改时间的方法

作者:佚名    责任编辑:admin    更新时间:2022-06-22

 下面的JS代码输出当前网页最后修改时间,用到了document.lastModified属性

1 2 3 4 5 6 7 8 9 <!DOCTYPE html> <html> <body> This document was last modified on: <script> document.write(document.lastModified); </script> </body> </html>

运行效果如下:

1 This document was last modified on: 04/03/2015 02:42:22