用JS获取DropDownList选中得值
HTML:
<asp:DropDownList ID="DropdownList1" runat="server" AutoPostBack="true" />
JS:
<script type="text/JavaScript">
function getvalue(){ var select1 = document.all.<%= DropdownList1.ClientID %>;
var selectvalue = select1.options[select1.selectedIndex].value;
var selectText= select1.options[select1.selectedIndex].text;
alert(selectvalue+" "+selectText);
}
</script>
用JS获取DropDownList选中得值的更多相关文章
- JS获取Dropdownlist选中值
var dropDownList = document.getElementById("ddl_sheng"); //获取DropDownList控件 var dropDownLi ...
- JS获取select选中的值,所有option值
<select name="myselect" id="myselect"> <option value="2042"&g ...
- JS获取DropDownList的value值与text值
<script type="text/javascript" language="javascript"> function SearchChang ...
- JS获取select选中的值
var oSel=oFl.getElementsByTagName('select')[0]; oSel.onchange=function(){ var indexselect=oSel.selec ...
- js获取radio选中索引值
<form name="form1" onsubmit="return foo()"> <input type="radio&quo ...
- jquery获取select选中的值
http://blog.csdn.net/renzhenhuai/article/details/19569593 误区: 一直以为jquery获取select中option被选中的文本值,是这样写的 ...
- DWZ-JUI 树形Checkbox组件 无法一次获取所有选中的值的解决方法
UI中 tree Checkbox 组件 在官方文档中提供的oncheck事件中只能够获取当前点击的权限值,而无法获取其他选中的值 <ul class="tree treeFolder ...
- js获取单选框的值
js获取单选框的值 var lx= $("input[name='lx']:checked").val();
- 获取RadioButton选中的值
1.RadioButtonList的RepeatDirection="Horizontal"可以设置按扭选项横对齐: 2.获取选中的RadioButton值; $("#& ...
随机推荐
- latex 小结
1 no file .bbl http://blog.csdn.net/zhedasuiyuan/article/details/9223637 另外,你可能有多个 .bbl.目前的做法是,在控制台上 ...
- dubbo管理控制台安装和使用
dubbo管理控制台安装和使用 标签: dubbo 2014-08-19 16:31 2436人阅读 评论(1) 收藏 举报 分类: dubbo(6) 版权声明:本文为博主原创文章,未经博主允许不 ...
- (实用篇)PHPExcel读取Excel文件的实现代码
用PHPExcel读取Excel 2007 或者Excel2003文件,需要的朋友,可以参考下. 涉及知识点: php对excel文件进行循环读取 php对字符进行ascii编码转化,将字符转为十进 ...
- numpy之sum
Definition : sum(a, axis=None, dtype=None, out=None, keepdims=False) axis: None or int or tuple of i ...
- MACOS,LINUX,IOS上可用的毫秒级精度时间获取
二话不说,先上代码 void outputCurrentTime(uint32_t seq,const char* type){ struct timeval t_curr; gettimeofday ...
- Spring MVC数组绑定
需求:商品批量删除,用户在页面选择多个商品,批量删除. 关键:将页面选择(多选)的商品id,传到controller方法的形参,方法形参使用数组接收页面请求的多个商品id // 批量删除 商品信息 @ ...
- spring mvc显示图片(个人记录)
@ResponseBody @RequestMapping(value = {"/",""}, method = RequestMethod.GET, prod ...
- Codeforces Round #128 (Div. 2)
A. Two Problems 分两题的过题情况讨论,并且数值均不大,暴力枚举. B. Game on Paper 每次给格子染色后,考虑当前格子在正方形中的位置,然后判断对应的正方形是否都已染色. ...
- 【转】详解使用tcpdump、wireshark对Android应用程序进行抓包并分析
原文网址:http://blog.csdn.net/gebitan505/article/details/19044857 本文主要介绍如何使用tcpdump和wireshark对Android应用程 ...
- Nginx反向代理讲解和配置
首先来介绍下Nginx的反向代理.代理服务器一般分为正向代理(通常直接称为代理服务器)和反向代理. 画个图我们就好理解了. 正向代理:可以想象成是路由器,我们要通过它来上网的那种.(可以说是客户端的代 ...