<script>
var oDate=new Date();
oDate.setMonth(oDate.getMonth()+1, 1);
// 11-1
oDate.setDate(0);
// 10-31
alert((oDate.getMonth()+1)+'-'+oDate.getDate());
</script>
<script>
var oDate=new Date();
oDate.setMonth(oDate.getMonth()+1, 1);
// 11-1
oDate.setDate(0);
// 10-31
alert((oDate.getMonth()+1)+'-'+oDate.getDate());
</script>
转载于:https://www.cnblogs.com/ddai/p/4362713.html