jq获取表格当前行的内容

1 $("#tab>tbody tr").on('click',function(){
2     var code_value=[]
3     $(this).children('td').each(function(){
4         code_value.push($(this).text())  //获取每一个td中的数据并放到数组中
5 }) 6 })

 

posted @ 2020-05-22 15:03  奔走的松鼠  阅读(1590)  评论(0编辑  收藏  举报