

//驗證若干DropDownList是否有選
//用法:var listIds = new Array("ddlYear", "txtMonth");
// var flag=DropDownExistsEmpty(listIds);
function DropDownExistsEmpty(listIds) {
for (var i = 0; i < listIds.length; i++) {
var list = document.getElementById(listIds[i]);
if (typeof (list) == "object" && (list.options.length == 0 || list.options.value.length == 0)) {
return true;
}
}
return false;
}