Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 javascript 从当前日期设置功能日期的日期对象。
例如,
需要设置“下个月10号”
这是正确的方式,如果我使用
var d = new Date(); d = d.setDate(10);
var date = new Date(); date.setMonth(date.getMonth()+1); date.setDate(10);