复制代码 代码如下:
function xingzuo() { 
var start = 1901, date=document.getelementbyid(txtday).value, month=document.getelementbyid(txtmonth).value;;
with (document.getelementbyid(txtxz)){ 
if (month == 1 && date >=20 || month == 2 && date if (month == 1 && date > 31) {value = huh?;} 
if (month == 2 && date >=19 || month == 3 && date if (month == 2 && date > 29) {value = say what?;} 
if (month == 3 && date >=21 || month == 4 && date if (month == 3 && date > 31) {value = ok. whatever.;} 
if (month == 4 && date >=20 || month == 5 && date if (month == 4 && date > 30) {value = i'm soooo sorry!;} 
if (month == 5 && date >=21 || month == 6 && date if (month == 5 && date > 31) {value = umm ... no.;} 
if (month == 6 && date >=22 || month == 7 && date if (month == 6 && date > 30) {value = sorry.;} 
if (month == 7 && date >=23 || month == 8 && date if (month == 7 && date > 31) {value = excuse me?;} 
if (month == 8 && date >=23 || month == 9 && date if (month == 8 && date > 31) {value = yeah. right.;} 
if (month == 9 && date >=23 || month == 10 && date if (month == 9 && date > 30) {value = try again.;} 
if (month == 10 && date >=23 || month == 11 && date if (month == 10 && date > 31) {value = forget it!;} 
if (month == 11 && date >=22 || month == 12 && date if (month == 11 && date > 30) {value = invalid date;} 
if (month == 12 && date >=22 || month == 1 && date if (month == 12 && date > 31) {value = no way!;} 
} 
}
   
 
   