fzestamob3
New Member
I implemented this function to add days to select list according to the month selected but it doesn't work.\[code\]function daysInMonth() { var year = document.getElementById(year).value; var month = document.getElementById(month).value; var dayscount = new Date(year,month, 0).getDate(); var select = document.getElementById(day); for (var c = 1 ; c <= dayscount ; c++){ var option = document.createElement("option"); option.text = c ; select.appendChild(option); }}\[/code\]and here's the html:\[code\]<select name="evmonth" id = "month" onchange="daysInMonth()">\[/code\]