jquery控制动态生成的gridview中多列checkbox的全选反选及自动判断是否全选状态
动态生成的Gridview的前台html代码如下:
<table class="usertableborder" cellspacing="0" rules="all" border="1" id="gvEquData"
style="border-collapse: collapse;">
<thead>
<tr class="Freezing">
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
序号
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
设备连接状态
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$samid')">POS机编号</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<span class="farupdateflag">
<input id="gvEquData_ctl01_farupdateflag" type="checkbox" name="gvEquData$ctl01$farupdateflag" /></span>FAR参数更新标识
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<span class="rwsoftupdateflag">
<input id="gvEquData_ctl01_rwsoftupdateflag" type="checkbox" name="gvEquData$ctl01$rwsoftupdateflag" /></span>软件更新标识
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<span class="mtksoftupdateflag">
<input id="gvEquData_ctl01_mtksoftupdateflag" type="checkbox" name="gvEquData$ctl01$mtksoftupdateflag" /></span>MTK软件更新标识
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$mtkcsnver')">MTK中黑名单版本</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<span class="rfsimsoftupdateflag">
<input id="gvEquData_ctl01_rfsimsoftupdateflag" type="checkbox" name="gvEquData$ctl01$rfsimsoftupdateflag" /></span>RFSIM软件更新标识
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<span class="iniupdateflag">
<input id="gvEquData_ctl01_iniupdateflag" type="checkbox" name="gvEquData$ctl01$iniupdateflag" /></span>INI文件更新标识
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<span class="posupdateflag">
<input id="gvEquData_ctl01_posupdateflag" type="checkbox" name="gvEquData$ctl01$posupdateflag" /></span>POS参数更新标识
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$bcbeginno')">补采起始号</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$bcendno')">补采截至号</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$bcbegindate')">补采起始日期</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$bcenddate')">补采结束日期</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$bctotalcount')">补采总条数</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$bccurrentcount')">
补采已上传条数</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$busno')">车辆编号</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$driverno')">司机编号</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$mtkusrver')">MTK中USR参数版本</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$mtkfarver')">MTK中FAR参数版本</a>
</th>
<th scope="col" style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all">
<a href="javascript:__doPostBack('gvEquData','Sort$mtkparver')">MTK中PAR参数版本</a>
</th>
</tr>
</thead>
<tbody>
<tr onmouseover="Color=this.style.backgroundColor;this.style.backgroundColor='RosyBrown'"
onmouseout="this.style.backgroundColor=Color;" ondblclick="showDetailInfo('?id=');return false;"
style="background-color: Silver;">
<td style="white-space: nowrap; word-break: keep-all; word-wrap: keep-all"> 补充:web前端 , JavaScript ,