ASP、JS

1、利用asp:Repeater向后台传复选框选中的值

给标签添加name属性并绑定值  如下:

<input  name="chkList"  value='<%#Eval("ID") %>' type="checkbox" /> 

后天用 Request.Form  接收  如下

string chkList = Request.Form["chkList"];

2、 JS全选 

Html:

<input  name="chkList" type="checkbox"  onclick="selectAllCheckbox(this, '表格id')" />

js:

function selectAllCheckbox(obj, tableId) {
            jW.$(tableId).tagList('input', function (o, key) { return o.type == 'checkbox' && o != obj }).each(function (inputObj) {
                inputObj.checked = obj.checked;
            })
        }

  

  

原文地址:https://www.cnblogs.com/cfss/p/asporjs.html