zoukankan      html  css  js  c++  java
  • Js序列化时间

     
     var time = "/Date(1279270720000+0800)/";
     var tme1 = ChangeDateFormat(time);
     alert(tme1);
    image
    JS方法为:
     
    function ChangeDateFormat(cellval) {
        var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10));
        var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
        var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
        return date.getFullYear() + "-" + month + "-" + currentDate;
    }
  • 相关阅读:
    ASP.NET伪静态配置
    拖动条控件 (UISlider)
    进度环控件 (UIActivityIndicatorView)
    进度条控件 (UIProgressView)
    图像控件 (UIImageView)
    分段控件 (UISegmentedControl)
    CocoaPods安装和使用教程
    iOS 在UILabel显示不同的字体和颜色
    iOS开源项目(新)
    iOS开源项目(旧)
  • 原文地址:https://www.cnblogs.com/automation/p/2954599.html
Copyright © 2011-2022 走看看