2014年8月23日 星期六

GridView 中的CheckBox全選

        $(document).ready(function () {
            $('input[id="btn_SelectAll"]').click(function () {
                var tbl = $('table[id ="myTable"]');
                tbl.each(function () {
                    $(this).find('tr').each(function () {
                        $(this).find('td').each(function () {
                            $(this).find('input[type="checkbox"]').attr('checked', false);
                        })
                    })
                })
            })
      })

參考:http://bigone2000.pixnet.net/blog/post/56715490-%E4%BB%A5jquery%E5%AF%A6%E4%BD%9Ccheckbox%E5%85%A8%E9%81%B8%E5%8A%9F%E8%83%BD

沒有留言:

張貼留言