You could have an array which holds the number of days for each month, where the index will correspond to the month:
daysArray[0]= days in January etc...
onChange in the month select box add some script which just takes the selected index from the month, and applies it to your array, returning the number of days.You can for loop it put all the values in for you.