當前位置:
首頁 >
前端技术
> javascript
>内容正文
javascript
javascript 获取DropDownList选定值的方法
生活随笔
收集整理的這篇文章主要介紹了
javascript 获取DropDownList选定值的方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<script type="text/javascript" language="javascript">
???? function submitData() {
???????? var d = document.getElementById("<%=DropDownList1.ClientID %>");//根據DropDownList的客戶端ID獲取該控件
???????? var typeValue = d.options[d.selectedIndex].value;//獲取DropDownList當前選中值
???????? alert(typeValue);//測試
????????
???????? }
???? }
??
???? function submitData() {
???????? var d = document.getElementById("<%=DropDownList1.ClientID %>");//根據DropDownList的客戶端ID獲取該控件
???????? var typeValue = d.options[d.selectedIndex].value;//獲取DropDownList當前選中值
???????? alert(typeValue);//測試
????????
???????? }
???? }
??
??? </script>
本文轉自懸魂博客園博客,原文鏈接:http://www.cnblogs.com/xuanhun/archive/2010/04/27/1722416.html,如需轉載請自行聯系原作者
總結
以上是生活随笔為你收集整理的javascript 获取DropDownList选定值的方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python 3 并发编程多进程之进程同
- 下一篇: AngularJS之代码风格36条建议【