jQuery를 사용하는 경우 월/일 상황을 처리 할 $.datePicker을 볼 수 있습니다. (그리고 다른 옵션 here). 형식 지정의 경우 $().tmpl을 볼 수 있습니다.
일반 자바 스크립트 만 사용하는 경우 해당 월의 값을 확인하여 해당 월의 일 수를 설정할 수 있습니다. 이렇게 뭔가.
var month_select = document.getElementById("month");
month_select.onchange = function(){
var month = month_select.options[mySelect.selectedIndex].value, days;
if(month == 2){ // Feb
days = 28; // or 29 if you want to check for the leap year as well
}else if(month % 2){ // if the month is "even"
days = month <= 7 : 30 : 31; // if the month is odd and between Jan - July, then it will have 30 days, otherwise it will have 31
}else{
days = month <= 7 : 31 : 30; // similar to above but when months are odd
}
// update days via DOM here
var options = month_select.options, options_length = options.length;
if(days > options_length){ // if it has options in days then the currently selected month, then remove some
}else if(days < options_length){ // if it has less, then add
} // if it has the same number, then don't do anything
}