获取单行选中的值

        $('#MonitoringTypeTable tbody').on('click', 'tr', function () {
            if ($(this).hasClass('selected')) {
                $(this).removeClass('selected');
            }
            else {
                dataTable.$('tr.selected').removeClass('selected');
                $(this).addClass('selected');
                var data = dataTable.rows('.selected').data(); // 获取选中的值
                if (data.length > 0) {
                    MonitorTypeId = data[0].basicMonitoringType.id; //获取对应的值
                    getMonioringTypeChart();
                }
          
            }
        });

 

相关文章:

  • 2021-10-05
  • 2021-12-01
  • 2021-09-19
  • 2021-08-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-23
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案