!DOCTYPEhtmlhtmlheadscriptfunctionrunnian(){varyear=document.getElementById(year).value;if(year%4==0){if(year%100==0&&year%400!=0){alert(year+不是闰年);}else{alert(year+是闰年);}}else{alert(year+不是闰年);}}/script/headbodyinputid=year/inputbuttonid=panduanonclick=runnian()判断是否闰年/button/body/html