• easy ui datatimebox databox 当前时间


    databox  当前日期:

      class="easyui-datebox"

    1 var curr_time = new Date();
    2         var strDate = curr_time.getFullYear() + "-";
    3         strDate += curr_time.getMonth() + 1 + "-";
    4         strDate += curr_time.getDate() + "-";
    5         strDate += curr_time.getHours() + ":";
    6         strDate += curr_time.getMinutes() + ":";
    7         strDate += curr_time.getSeconds();
    8         $("#openTime").datetimebox("setValue", strDate);

    datatimebox 当前日期(包含时分秒):

      class="easyui-datetimebox"

    formatterDate = function (date) {
                   var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
                   var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
                   + (date.getMonth() + 1);
                   var hor = date.getHours();
                   var min = date.getMinutes();
                   var sec = date.getSeconds();
                   return date.getFullYear() + '-' + month + '-' + day+" "+hor+":"+min+":"+sec;
                  };
                   $("#closeTime").datetimebox("setValue",formatterDate(new Date()));
  • 相关阅读:
    3-2
    3-1
    2-11
    2-10
    2-7
    2-9
    springboot 使用undertow代替tomcat容器提高吞吐量
    springboot—JVM性能参数调优
    springbootDay3
    springboot_Mybaits_PageHelper
  • 原文地址:https://www.cnblogs.com/jdw12306/p/6722880.html
Copyright © 2020-2023  润新知