var today = new Date(); if (today.getMonth() === 3 && today.getDate() === 14) { alert('亲爱的,我预定了晚餐,晚上6点在餐厅见!'); }
月是3的话, 才应该是2月14,是这样么?
说错了, 0 是 一月, 1 就是二月了。
Sign in to make a reply
Foley大葛格
var today = new Date(); if (today.getMonth() === 3 && today.getDate() === 14) { alert('亲爱的,我预定了晚餐,晚上6点在餐厅见!'); }
月是3的话, 才应该是2月14,是这样么?