返回列表 回复 发帖

[转帖]离2008北京奥运会还有

作者:farewell
  1. <Script Language = "JavaScript">
  2. function time1()
  3. {
  4. now=new Date();
  5. m=now.getMonth();
  6. n=now.getYear()
  7. a=2008-now.getYear();
  8. b=12-now.getMonth();
  9. if(m=1,3,5,7,8,10,12){c=31-now.getDate()}
  10. if(m=4,6,9){c=30-now.getDate()}
  11. if(m=2){c=28-now.getDate()}
  12. if(n=2004,2008){c=29-now.getDate()}
  13. e="0"+24-now.getHours();
  14. f="0"+59-now.getMinutes();
  15. g="0"+60-now.getSeconds();
  16. if(e>10){e=24-now.getHours()}
  17. if(f>10){f=59-now.getMinutes()}
  18. if(g>10){g=60-now.getSeconds()}
  19. document.Time.CLOCK.value="离2008北京奥运会还有"+a+"年"+b+"个月"+c+"天"+e+"小时"+f+"分"+g+"秒"
  20. setTimeout( 'time1()',1000)
  21. }
  22. </SCRIPT>
  23. <form method="post" name="Time">
  24. <input name="CLOCK" size="52" value="">
  25. </form>
  26. <SCRIPT>
  27. time1()
  28. </SCRIPT>
复制代码
哈哈哈!!!!你的IP是不是?我都知道了!!!
返回列表