<select id="year" style=" 100px;"></select>
<select id="month" style=" 100px;"></select>
//初始化年
var now = new Date();
var nowYear = now.getFullYear();
for (var i = nowYear;i <= nowYear+10; i++) {
var option = $("<option/>").val(i).text(i);
$('#year').append(option);
}
$('#year').val(nowYear);
//初始化月
for (var i = 1;i <= 12; i++) {
var j=i<10?'0'+i:i;
var option = $("<option/>").val(j).text(j);
$('#month').append(option);
}
var month = now.getMonth() + 1;
month = month < 10 ? '0' + month : month;
$('#month').val(month);