get value from a field in a table with JavaScrip

-1

I'm trying to get the value of a specific field within a table, the data is brought with AJAX from an API. I tried with .value but I think it only works for inputs.

    
asked by Gabriela 09.05.2018 в 17:08
source

1 answer

0

I have managed to solve it, I apologize if it was something little information but I saw it clearly enough, at the end I was able to access the field I wanted in the following way;

var x = document.getElementsByTagName("td");
var dato1=x[2].innerHTML;

and so only by changing the value of% de [] I can access the specific field.

Greetings!

    
answered by 09.05.2018 в 18:18