javascript 获取DropDownList选定值的方法

来源:互联网 发布:java多线程join 锁 编辑:程序博客网 时间:2024/06/05 17:52
 <script type="text/javascript" language="javascript">     function getDDLData() {         var data = document.getElementById("<%=DropDownList1.ClientID %>");//根据DropDownList的客户端ID获取该控件         var typeValue = data.options[data.selectedIndex].value;//获取DropDownList当前选中值         alert(typeValue);//测试                 }     }      </script>


 

原创粉丝点击