下拉列表DropDownList,经常在客户端用JS处理,假设页面存在一下拉列表ddlPro
获取总项数:
document.getElementById("ddlPro").options.length;
获取当前选择项的文本:
document.getElementById("ddlPro").options[document.getElementById("ddlPro").selectedIndex].text;
获取当前选择项的值:
document.getElementById("ddlPro").options[document.getElementById("ddlPro").selectedIndex].text;