Jquery get values of all checked rows in table gridview

后端 未结 5 1249
慢半拍i
慢半拍i 2020-12-15 13:53

I have a table like below


<         
5条回答
  •  醉话见心
    2020-12-15 14:25

    This does what you ask for:

    $(document).ready(function() {
        var tableControl= document.getElementById('mytable');
        $('#jqcc').click(function() {
            var obj = new Array();
            $('input:checkbox:checked', tableControl).each(function() {
                var innertext = $(this).parent().next().text();
                obj.push(innertext);
            });
                console.debug(obj); // Write it to the console
        });
    });
    

    ​http://jsfiddle.net/uEr3n/

提交回复
热议问题
checkedidtext