JS读取DropDownList中的值
来源:互联网 发布:网络摄像头接线图解 编辑:程序博客网 时间:2024/06/03 19:14
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>无标题页 </title> <script type="text/javascript"> function aa() { var ddl = document.getElementById("DropDownList1"); alert(ddl.selectedIndex);//选择索引值 alert(ddl.options[ddl.selectedIndex].value);//绑定值 alert(ddl.options[ddl.selectedIndex].text);//文本值 } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:DropDownList ID="DropDownList1" runat="server"> <asp:ListItem Value="1">一 </asp:ListItem> <asp:ListItem Value="2">二 </asp:ListItem> <asp:ListItem Value="3">三 </asp:ListItem> </asp:DropDownList> <input id="Button1" style="position: relative" type="button" value="button" onclick="aa();" /> </div> </form> </body> </html>
0 0
- JS读取DropDownList中的值
- 连接数据库,读取数据库中的一列值,并赋值到dropdownlist中
- XML读取,为dropdownlist绑定值
- 绑定DropDownList的中的值
- 使用XmlDocument 读取books.xml中的书名到DropDownList中
- 使用XmlDocument 读取books.xml中的书名到DropDownList中
- 好好学习:js中设置dropdownlist的值
- js获取下拉框(DropDownList)当前值
- JS获取DropDownList 选中值的value
- 用JS获取DropDownList选中得值
- js 取DropDownList选中的值
- JS获取DropDownList选择项的值
- 用JS获取DropDownList选中得值
- js获取DropDownList的显示值
- JS获取DropDownList选择项的值
- 亲试,JS获取dropDownList值或文本
- dropdownlist中的select的一些常见js操作方法
- 根据值选中DropDownList中的项
- java实现字符串全排序
- F2FS文件系统架构与原理分析(五)——元数据组织及管理
- SharedPreferences保存二维码扫描的网址信息到本地
- XCode5 编译ffmpeg流程
- Tasks、 activity 及 activity stack
- JS读取DropDownList中的值
- UIScrollView的属性总结
- Hibernate注解版关联关系映射全解析+案例
- F2FS文件系统架构与原理分析(六)——块分配与空间管理
- 字符串的全排列和组合算法
- CSS+DIV布局中absolute和relative区别
- 面向对象设计(OOD)七大原则
- java学习课堂笔记3
- opencv中的一些矩阵的简单操作函数