原文:js獲取本周/本月時間

轉自於:https: www.cnblogs.com tlfe p .html var now new Date 當前日期 var nowDayOfWeek now.getDay 今天本周的第幾天 var nowDay now.getDate 當前日 var nowMonth now.getMonth 當前月 var nowYear now.getYear 當前年 nowYear nowYear ...

2020-01-02 09:18 0 4316 推薦指數:

查看詳情

Js 獲取 本周本月起始時間

涉及到顯示本月本周相關信息,又不想讓php去判斷,只好直接用js去計算,麻煩了好一陣,還是老老實實的看了下js的日期函數。現總結一下: //計算本周起始日期,並以 Y-m-d 形式返回。 function getWeekTime() { var now = new ...

Thu Apr 10 20:57:00 CST 2014 0 2654
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM