jQuery选择特定父元素中的所有元素

spa*_*key 11 jquery css-selectors

我需要循环遍历所有表元素,在某处保留索引,然后循环遍历这些表中的所有元素.想法是将关于表内元素的信息与其表索引一起添加到数据库中.

rek*_*o_t 20

$('table').each(function(index) {
    $(this).find('*').each(function() {
        /* do magic */
    });
});
Run Code Online (Sandbox Code Playgroud)