
function SetYearValue(selobj)
{var _txt=document.form1.hidYear;var _txtyear=selobj.options[selobj.selectedIndex].value;var m=0;var _date=new Date();if(_txtyear>_date.getYear())
{inimonth(1,10-12+_date.getMonth());}
else if(_txtyear==(_date.getYear()-6))
{inimonth(_date.getMonth()+1,12);}
else
{inimonth(1,12);}
_txt.value=selobj.options[selobj.selectedIndex].value;document.form1.month.selectedIndex=0;}
function SetMonthValue(selobj)
{var _year=document.form1.hidYear.value;var _txt=document.form1.hidMonth;var _txtmonth=selobj.options[selobj.selectedIndex].value;var k=0;switch(_txtmonth)
{case"0":k=0;break;case"4":k=30;break;case"6":k=30;break;case"9":k=30;break;case"12":k=30;break;case"2":k=28;break;default:k=31;}
if(isleapyear(_year)&&(_txtmonth==2))
{k=k+1}
iniday(k)
_txt.value=selobj.options[selobj.selectedIndex].value;}
function inimonth(begincount,endcount)
{var _monthops=document.form1.month.options
while(_monthops.length>1)
{_monthops.remove(1);}
for(i=begincount;i<=endcount;i++)
{var oOption=document.createElement("OPTION");document.form1.month.options.add(oOption);oOption.innerText=i;oOption.value=i;}}
function iniday(count)
{var _dayops=document.form1.day.options
while(_dayops.length>1)
{_dayops.remove(1);}
for(i=1;i<=count;i++)
{var oOption=document.createElement("OPTION");document.form1.day.options.add(oOption);oOption.innerText=i;oOption.value=i;}}
function SetDayValue(selobj)
{var _txt=document.form1.hidDay;_txt.value=selobj.options[selobj.selectedIndex].value;}
function isleapyear(thisyear)
{return(((thisyear%4==0)&&(thisyear%100!=0))||(thisyear%400==0));}
function Babysubmit()
{var _year=document.form1.hidYear.value;var _month=document.form1.hidMonth.value;var _day=document.form1.hidDay.value;if(_year=="0")
{alert("请选择年份");document.form1.year.focus();return false;}
if(_month=="0")
{alert("请选择月份");document.form1.month.focus();return false;}
if(_day=="0")
{alert("请选择日期");document.form1.day.focus();return false;}
var selDate=new Date(_year+"/"+_month+"/"+_day);var nowDate=new Date();var tempnumber=0
if(selDate>nowDate)
{tempnumber=(10-(((selDate.getYear()-nowDate.getYear())*12)+(selDate.getMonth()-nowDate.getMonth())));openweb1(tempnumber)}
else
{tempnumber=((nowDate.getYear()-selDate.getYear())*12+(nowDate.getMonth()-selDate.getMonth()));}
return true;}
function openweb1(num)
{var webnum=191690-1+num;}
function openweb2(num)
{var webnum=191700-1
if((num<41)&&(num>=38))
{webnum=191700+num;}
else if(num>=41)
{webnum=191700+1+num;}
else
{webnum=191700-1+num;}}
function iniyear()
{d=new Date();var _toyear=d.getYear();for(i=_toyear-6;i<=_toyear+1;i++)
{var oOption=document.createElement("OPTION");document.form1.year.options.add(oOption);oOption.innerText=i;oOption.value=i;}}
本文来源转载请注明出处：http://www.3464.com/Tools/JSzip/