zoukankan      html  css  js  c++  java
  • php 后台传回前端日期字符串抓换成时间对象

    老的js 页面                     
    $.post('{:U("getNowTimeFormat")}', function(data){
                            let json = JSON.parse(data); 
                            let s = json.formatDate;
                            s = s.replace(/-/g,"/");
                            let date = new Date(s).getTime();
                        });
     
    新的页面可以直接干
                        axios.get("{:U('getNowTimeFormat')}")
                            .then(response => {
                                let nowTime = new Date(response.data.formatDate).getTime()
                            })
  • 相关阅读:
    980不同路径III
    输入函数
    IDEA更新maven依赖包
    join()函数
    方差偏差困境
    np.bincount()函数
    72编辑距离
    741摘樱桃
    523连续的子数组和
    1306跳跃游戏III
  • 原文地址:https://www.cnblogs.com/quepq/p/15156021.html
Copyright © 2011-2022 走看看