var ddl = document.getElementById("DropDownList1"); alert(ddl.selectedIndex);//选择索引值 alert(ddl.options[ddl.selectedIndex].value);//绑定值 alert(ddl.options[ddl.selectedIndex].text);//文本值
时间: 2024-10-13 02:43:01
var ddl = document.getElementById("DropDownList1"); alert(ddl.selectedIndex);//选择索引值 alert(ddl.options[ddl.selectedIndex].value);//绑定值 alert(ddl.options[ddl.selectedIndex].text);//文本值