日期:2014-05-16 浏览次数:20527 次
<span id="time"></span> <script> function setTime(val) { val = parseInt(val) + 1; var D = new Date(val * 1000); var dateStr = ""; var dateStr = dateStr + D.getFullYear() + "年"; dateStr = dateStr + (D.getMonth() + 1) + "月"; dateStr = dateStr + D.getDate() + "日 "; dateStr = dateStr + D.getHours() + ":"; dateStr = dateStr + D.getMinutes() + ":"; dateStr = dateStr + D.getSeconds(); document.getElementById("time").innerHTML = dateStr; setTimeout("setTime(" + val + ")", 1000); } var val = 1328151430; setTime(val); </script>