Getting value from table cell in JavaScript…not jQuery

后端 未结 12 1152
后悔当初
后悔当初 2020-12-02 18:19

I can\'t believe how long this has taken me but I can\'t seem to figure out how to extract a cell value from an HTML table as I iterate through the table with JavaScript. I

12条回答
  •  感情败类
    2020-12-02 19:07

    If you are looking for the contents of the TD (cell), then it would simply be: col.innerHTML

    I.e: alert(col.innerHTML);

    You'll then need to parse that for any values you're looking for.

提交回复
热议问题