用js 判断datagrid 中的 checkbox 是否被选中private void Page_Load(object sender, System.EventArgs e)

 

用js 判断datagrid 中的 checkbox 是否被选中function get_value(dataid)
用js 判断datagrid 中的 checkbox 是否被选中         {
用js 判断datagrid 中的 checkbox 是否被选中          
var  s=document.getElementsByTagName("input")
用js 判断datagrid 中的 checkbox 是否被选中          
var  flag=false;
用js 判断datagrid 中的 checkbox 是否被选中                
for (i=0;i<s.length;i++)
用js 判断datagrid 中的 checkbox 是否被选中                {用js 判断datagrid 中的 checkbox 是否被选中                   
if(s[i].type=="checkbox" &&  s[i].checked && s[i].id.substring (0,dataid.length)==dataid) //判断是否为checkbox 类型,判断是否被选中,判断是不是 datagrid 的 checkbox .
用js 判断datagrid 中的 checkbox 是否被选中
                                                                                                              //此处注意命名时不能以 datagrid 命名开头的  例如  datagrid id 为 abc, 就不能再命名以 abc 命名开头的了 比如命名为 abcd,abce,abcdefb,
用js 判断datagrid 中的 checkbox 是否被选中
                   { 
用js 判断datagrid 中的 checkbox 是否被选中                    flag
=true;
用js 判断datagrid 中的 checkbox 是否被选中                     
用js 判断datagrid 中的 checkbox 是否被选中                   }
用js 判断datagrid 中的 checkbox 是否被选中                }
用js 判断datagrid 中的 checkbox 是否被选中                
if (flag)
用js 判断datagrid 中的 checkbox 是否被选中                
return  window.confirm("删除吗");
用js 判断datagrid 中的 checkbox 是否被选中                 
else
用js 判断datagrid 中的 checkbox 是否被选中                 {
用js 判断datagrid 中的 checkbox 是否被选中                 window.alert (
"你没有选择数据")
用js 判断datagrid 中的 checkbox 是否被选中                 
return false;
用js 判断datagrid 中的 checkbox 是否被选中                  }
用js 判断datagrid 中的 checkbox 是否被选中          
用js 判断datagrid 中的 checkbox 是否被选中         
用js 判断datagrid 中的 checkbox 是否被选中            
用js 判断datagrid 中的 checkbox 是否被选中                
用js 判断datagrid 中的 checkbox 是否被选中          
用js 判断datagrid 中的 checkbox 是否被选中         }



 

相关文章:

  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
猜你喜欢
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
  • 2021-12-09
相关资源
相似解决方案