javascript中取得asp.net的DropDownList控件的值
时间:2011-12-27 23:31来源: 作者:admin 点击: 次
页面中用的DropDownList控件时,需要用javascript客户端脚本进行验证时,
var ddl = document.getElementByIdx_x("控件名");
取得选中的列的值
ddl.options[ddl.selectedIndex].text
取得选中值相对应的ID
ddl.options[ddl.selectedIndex].value (责任编辑:admin)
var ddl = document.getElementByIdx_x("控件名");
取得选中的列的值
ddl.options[ddl.selectedIndex].text
取得选中值相对应的ID
ddl.options[ddl.selectedIndex].value
