js取得dropdownlist的text,value[转]

取DropDownList的Text内容:

document.getElementById("DropDownListClientID").options[document.getElementById("DropDownListClientID").selectedIndex].text


取DropDownList的Value内容:

document.getElementById("DropDownListClientID").value

document.getElementById("DropDownListClientID").options[document.getElementById("DropDownListClientID").selectedIndex].value

posted on 2010-09-03 11:20  代码泪  阅读(1344)  评论(0编辑  收藏  举报

导航