• js 得到 radiobuttonlist和CheckBoxList 选中值


    得到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);                
                }
     
     
  • 相关阅读:
    关于PPTP不能打开部分网页
    在MarS Board上搭建PPTP
    Mars Board上无法使用apt-get
    在MarS board上烧录系统镜像
    PHP-变量(1)
    在KEIL 4.72中使用STM32的3.5固件库
    android SDK中java环境变量配置
    android SDK中打开AVD时提示PANIC: Could not open:XX
    ckplayer通过Mod-H264支持随意拖动功能
    430学习笔记-内置ADC12
  • 原文地址:https://www.cnblogs.com/meimao5211/p/3293483.html
Copyright © 2020-2023  润新知