得到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. nginx做反向代理配置文件的例子

    worker_processes ; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error ...

  2. ocelot+consul+identity4的使用demo

    Ocelot网关搭建 搭建core控制台项目 本demo采用2.1版本 命名为APPIGateWay 在Nuget包中添加Ocelot引用 选用8.0.0版本 添加Ocelot.json 文件 内容为 ...

  3. 在PL/SQL DEV里面有把锁一样的按钮,点击它会跳出“these query result are not updateable,include the ROWID to get updateab

    在PL/SQL DEV里面有把锁一样的按钮,点击它会跳出“these query result are not updateable,include the ROWID to get updateab ...

  4. python多进程和多线程编程

    17 多线程和多进程并发 The modules described in this chapter provide support for concurrent execution of code. ...

  5. Linux:iscsi存储服务器配置

    服务器添加4块硬盘 mdadm -Cv /dev/md0 -n 3 -l 5 -x 1 /dev/sdb /dev/sdc /dev/sdd /dev/sde 记下UUID值 mdadm -D /de ...

  6. 自己动手编写vue插件

    一.为什么要自己动手写插件呢,原因有二: 其一:是因为最近产品了提了一个在web端接收,消息通知的需求,产品要求在若干个页面内如果有消息,就要弹出消息弹窗展示给用户,略加思索之后,第一反应就是写个消息 ...

  7. 百练2815:城堡问题(DFS)

    描述 1 2 3 4 5 6 7 ############################# 1 # | # | # | | # #####---#####---#---#####---# 2 # # ...

  8. HDU 1114 完全背包问题的转化

    题目大意: 根据存钱罐中钱的重量,和每一种钱对应的重量和价值,判断钱能否塞满这个重量,如果能,输出得到的最小价值 这个问题就是要把它和背包问题连接起来,这里钱取得数目是无穷的,所以这里只需要用到完全背 ...

  9. poj 3925 枚举+prime

    /* 因为15很小可以暴力枚举然后用最小生成树的prim来计算 */ #include<stdio.h> #include<string.h> #include<math ...

  10. android获取年月日时分秒

    Calendar calendar=Calendar.getInstance(); //获取当前时间,作为图标的名字 String year=calendar.get(Calendar.YEAR)+& ...