Chinaunix首页 | 论坛 | 博客
  • 博客访问: 24767
  • 博文数量: 8
  • 博客积分: 130
  • 博客等级: 入伍新兵
  • 技术积分: 75
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-13 15:31
文章分类

全部博文(8)

文章存档

2016年(2)

2011年(5)

2010年(1)

我的朋友
最近访客

分类: JavaScript

2016-01-27 22:13:19


点击(此处)折叠或打开

  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. //时间戳格式化
  5. function getValue(arg)
  6. {
  7. var real_time = new Date(arg * 1000);
  8. var hours = (real_time.getHours() < 10) ? (0 + "" + real_time.getHours()) : real_time.getHours();
  9. var minutes = (real_time.getMinutes() < 10) ? (0 + "" + + real_time.getMinutes()) : real_time.getMinutes();
  10. var seconds = (real_time.getSeconds() < 10) ? (0 + "" + + real_time.getSeconds()) : real_time.getSeconds();
  11. real_time = real_time.toLocaleDateString() + " " + hours + ":" + minutes + ":" + seconds
  12. return real_time;
  13. }
  14. </script>
  15. </head>

  16. <body>
  17. <table>
  18. <tr>
  19. <td id="shijian">
  20. <script type="text/javascript">document.write(getValue(1233511790))</script>
  21. </td>
  22. </tr>

  23. </body>
  24. </html>


阅读(659) | 评论(0) | 转发(0) |
0

上一篇:svn_cmd.py

下一篇:没有了

给主人留下些什么吧!~~