我想帮助更新此 date.js 代码以删除 document.write 语句,因为它现在已过时
if (Date.parse(document.lastModified) != 0) {
var modiDate = new Date(document.lastModified);
var monthName = new Array("January", "February", "March", "April", "May",
"June", "July", "August", "September", "October", "November", "December");
document.write(monthName[modiDate.getMonth()] + " ");
document.write(modiDate.getDate() + ", " + modiDate.getFullYear());
}
我用什么来代替 document.write(......请
javascript 代码通过此代码 snipit 在网页底部生成一个(文件)更新于 2019 年 9 月 12 日
<p>Updated <script type="text/javascript" src="/public/jsscripts/date.js"> </script>
谢谢马克
扬帆大鱼
江户川乱折腾
相关分类