在网页上添加一个更新时间的代码
这段代码可以添加到你网页上,这样给人感觉你的站每天都在更新,尤其适合评论站!<div id="Update"><script>var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
document.write("Last Updated: "+montharray+" "+daym+", "+year+"")
</script></div>演示:Last Updated: February 01, 2009 有意思的东东
页:
[1]