function GetMonth() { var result = []; var result_small = []; var result_big = []; for (var i = 1; i <= 12; i++) { var d = new Date(); var m = d.getMonth() + 1; if (i <= m) { result_small.push(i + '月'); } else { //result_big.push('去年' + i + '月'); result_big.push(i + '月'); } } result = result_big.concat(result_small); return result; } function GetDate() { var result = []; var result_small = []; var result_big = []; var d = new Date(); var m = d.getDate(); for (var i = 1; i <= 31; i++) { if (i <= m) { result_small.push(i); } else { //result_big.push('去年' + i + '月'); result_big.push(i); } } result = result_big.concat(result_small); return result; }