var  myDate = new Date();

//获取本月第一天周几
var monthFirst = new Date(myDate.getFullYear(), parseInt(myDate.getMonth()), 1).getDay();
//获取本月天数(获取后一个月的0日即前一月的最后一日)
var totalDay=(new Date(myDate.getFullYear(), parseInt(myDate.getMonth() + 1), 0)).getDate();

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2021-08-04
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2022-02-27
  • 2022-02-04
  • 2021-06-20
相关资源
相似解决方案