日期:2014-05-16  浏览次数:20358 次

js动态时间显示

源:http://josephmok.iteye.com/blog/781558

评:

  1. <script>???
  2. ????document.write("<span?id=time></span>")??
  3. ????????setInterval(function(){???
  4. ????with(new?Date)?? {
  5. ????time.innerText=getYear()+"年"+(getMonth()+1)+"月"+getDate()+"日?星期"+??
  6. ????????"日一二三五六".charAt(getDay())+""+getHours()+":"+getMinutes()+":"+getSeconds()???
  7. ????},1000)??? }??
  8. </script>??

?