Discuss / JavaScript / js里月份是0~11表示

js里月份是0~11表示

Topic source

if (today.getMonth() === 1 && today.getDate() === 14) {

    alert('亲爱的,我预定了晚餐,晚上6点在餐厅见!');

}

2月14应该today.getMonth() === 1

哈儿wawa

#2 Created at ... [Delete] [Delete and Lock User]

你能运行出来?


  • 1

Reply