Getting text from td cells with jQuery

后端 未结 5 1493
有刺的猬
有刺的猬 2020-12-11 00:00

I have this code in jQuery:

children(\'table\').children(\'tbody\').children(\'tr\').children(\'td\')

Which gets all table cells for each r

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 00:50

    $(document).ready(function() {
      $('td').on('click', function() {
        var value = $this.text();
      });
    });
    

提交回复
热议问题