//函数体中中调用set_month_year_now ()函数
//下面列出可能的函数原型
//网址:http://www.2cto.com/kf/201110/109481.html
function set_month_year_now () {
var form = document.calendar;
var now = new Date ();
monthNow = now.getMonth () + 1;
yearNow = now.getYear ();
dayNow = now.getDate();
yearNow = ( yearNow < 100 ) ? yearNow + 1900 : yearNow;
var count = 0
for (var i = yearNow-103; i < yearNow + 50; i++) {
eval("form.yearList.options[count] = new Option('"+i+"', '"+i+"')");
count++;
}
form.yearList.selectedIndex = 103;
form.yearList.length = count;
}
function error () {
alert ( "超出范围!" );
}