得到radiobuttonlist 选中值:
var CheckBoxList=document.all.optButtonList; 
            var objCheckBox,CheckValue="";
            for(i=0;i<CheckBoxList.rows.length;i++)   
            {   
                 objCheckBox   =    document.getElementById('optButtonList'+ "_"   +    i); 
                  if(objCheckBox.checked == true)
                   {
                                              CheckValue = objCheckBox.value;   
                   }
            }
            if(CheckValue!="")
            {
                alert(CheckValue)  ;          }
           
得到 CheckBoxList 选中值
 var CheckBoxList=document.all.checkList; 
            var objCheckBox,CheckValue="";
            for(i=0;i<CheckBoxList.rows.length;i++)   
            {   
                 objCheckBox   =    document.getElementById("checkList_"   +    i); 
                  if(objCheckBox.checked == true)
                   {
                         CheckValue += CheckBoxList.rows[i].cells[0].childNodes(1).innerText + ",";   
                   }
            }
            if(CheckValue!="")
            {
                  alert(CheckValue);                
            }
 
 
 
标签: c#

js 得到 radiobuttonlist和CheckBoxList 选中值的更多相关文章

  1. JQuery设置与获取RadioButtonList和CheckBoxList的值

    有这样一个问题,要获取ASP.NET控件RadioButtonList的值,首先想到的就是$("#<%=RadioButtonList1.ClientID %>").v ...

  2. JQuery/JS select标签动态设置选中值、设置禁止选择 button按钮禁止点击 select获取选中值

    //**1.设置选中值:(根据索引确定选中值)**// var osel=document.getElementById("selID"); //得到select的ID var o ...

  3. C#遍历得到checkboxlist选中值和设置选中项

    得到选中项的value值并拼接成一个字符串返回 public string GetChecked(CheckBoxList checkList, string separator) { string ...

  4. js获取checkbox中所有选中值及input后面所跟的文本

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  5. php页面输出时,js设置input框的选中值

    /* 设置表单的值 */ function setValue(name, value) { var first = name.substr(0, 1), input, i = 0, val; if ( ...

  6. js获取input checkbox的选中值

    HTML代码: <form action="/test/action" method="get"> <input type="che ...

  7. js获得checkbox选中值及input后面的文本

    原文:http://blog.csdn.net/u014079773/article/details/51865596 js如何获得多个checkbox选中的值及input后面所跟的文本 <!d ...

  8. ----------jqery和js如何判断checkbox是否选中 --------两个单选按钮如何选一个,且用jquery获取被选的值

    jqery和js如何判断checkbox是否选中 jquery: <div id="divId" class="divTable"> <div ...

  9. 获取checkboxlist选中的值以及绑定来自之前选中的来自数据库的值

    //////ps:一下几句都是一个意思,为的是以后有人搜索关键字的时候能定位到这里///checkboxlist绑定选中值///checkboxlist绑定来之mssql数据的值///checkbox ...

随机推荐

  1. ThinkPHP---layer插件

    [概论] (1)layer是基于jquery开发的一款美化弹框的插件,主要用于弹框效果的交互.但其他功能和组件也日益完善 官网:http://layer.layui.com 在线手册:http://w ...

  2. 05C语言数组

    C语言数组 一维数组 类型符 数组名[常量表达式] #include <stdio.h> int main(){ ] = {,,,}; int a; ;a<;a++){ printf ...

  3. HDU多校Round 4

    Solved:3 rank:405................................. B. Harvest of Apples 知道了S(n,m) 可以o(1)的求S(n - 1, m ...

  4. LTTng

    Waiting for dig... http://frederic-wou.net/lttng/

  5. numpy.random模块常用函数解析

    numpy.random模块中常用函数解析 numpy.random模块官方文档 1. numpy.random.rand(d0, d1, ..., dn)Create an array of the ...

  6. Python的/整除

    在python3和python2里,正整数的/结果是一样的,但是负数的整除却有区别 比如python3中,-1/2是等于0的,c/c++的结果也是这样, 但在python2中,-1/2确是-1,想要得 ...

  7. 为什么要有uboot?带你全面分析嵌入式linux系统启动过程中uboot的作用

    1.为什么要有uboot 1.1.计算机系统的主要部件 (1)计算机系统就是以CPU为核心来运行的系统.典型的计算机系统有:PC机(台式机+笔记本).嵌入式设备(手机.平板电脑.游戏机).单片机(家用 ...

  8. windows下通过navicat for mysql连接centos6.3-64bit下的MySQL数据库

    一.centos下MySQL安装 按照命令依次安装以下文件: mysql-devel 开发用到的库以及包含文件 mysql mysql 客户端 mysql-server 数据库服务器 yum inst ...

  9. 线段树题集 (cf版)

    lazy区间修改   : http://acm.hdu.edu.cn/showproblem.php?pid=4902   (hdu4902) http://acm.hdu.edu.cn/showpr ...

  10. JAVA NIO 之Channel

    缓冲区本质上是一块可以写入数据,然后可以从中读取数据的内存.Channel 通道就是将数据传输给 ByteBuffer 对象或者从 ByteBuffer 对象获取数据进行传输. Channel 用于在 ...