-2

I don't know how to assign the keyword that matches my topic.

console.log($container.handsontable('getCell', row, 0));

and I got

 <td class="htDimmed" style="color: rgb(153, 153, 153);">*</td>

in return.

I want to get the data from a specific cell. How can you get data from a specific cell?

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697

2 Answers2

0

If you have only one td with class .htDimmed then you could use this:

document.getElementsByClassName('htDimmed')[0].innerHTML;
aksu
  • 5,221
  • 5
  • 24
  • 39
0

you can do 2 things either you can give any class for specific cell or you can give id for that like below code.

 <td class="htDimmed spcell" style="color: rgb(153, 153, 153);">*</td>

Here you can fetch data through this,

document.getElementsByClassName('spcell')[0].innerHTML;

or

<td class="htDimmed spcell" id="spid" style="color: rgb(153, 153, 153);">*</td>

Here you can fetch data through id,

document.getElementById('spid').innerHTML;
Ashish Jain
  • 760
  • 1
  • 8
  • 23