直播卖货系统开发,获取当前时间实现的相关代码
TimeDate(){date&#61;new Date()let Year&#61;date.getFullYear();let Month&#61;date.getMonth()&#43;1;let Day&#61;date.getDate();let Hours&#61;date.getHours();let Minutes&#61;date.getMinutes();let Seconds&#61;date.getSeconds();Month &#61; Month<10?("0"&#43;Month):Month;Day &#61; Day<10?("0"&#43;Day):Day;Hours &#61; Hours<10?("0"&#43;Hours):Hours;Minutes &#61; Minutes<10?("0"&#43;Minutes):Minutes;Seconds &#61; Seconds<10?("0"&#43;Seconds):Seconds;return Year&#43;"-"&#43;Month&#43;"-"&#43;Day &#43; " "&#43;Hours&#43;":"&#43;Minutes&#43;":"&#43;Seconds},
以上就是直播卖货系统开发&#xff0c;获取当前时间实现的相关代码&#xff0c; 更多内容欢迎关注之后的文章