js checkbox

        //        var bd = Form1.getElementsByTagName("input");//得到GridViewbd的所有input控件        

//        var qx = document.getElementById("CheckAll");//得到id是checkall的信息        

//        for (i = 0; i < bd.length; i++) {     //循环GridViewbd的控件        

//            alert(bd[i].id);        

//            if (bd[i].id == "MainContentPH_LeftContentPH_ctl02_dbGridView_ctl00_ctl01_ctl00_chkSelect_" + i)    

//判断check的id是否等于  循环出空间的个数        

//            {        

//                if (bd[i].type == "checkbox") {

//判断是否checkbox

        //                    bd[i].checked = qx.checked;

        //                }       

  //            }        

//        }        

//    })     

    //})

        //$(function () {        

//    $("#CheckAll").click(function () {        

//        alert(this.checked.toString());     

    //        var mark = this.checked;     

    //        $(":checkbox").each(function () {     

    //            alert(this.CssClass)       

  //            if (this.CssClass == "cd") {      

   //                this.checked = mark;       

  //            }      

   //        })

        //        

    //  if ($(":checkbox").ToolTip != null && $(":checkbox").ToolTip>0)        

//            $(":checkbox").attr("checked", $(this).attr("checked"));

        //            $("[input]").attr("checked",$(this).attr("checked"))       

  //        })        

//$("ProvinceLB").click(function () {

        //})      

   // })

原文地址:https://www.cnblogs.com/yyzyou/p/3238158.html