Getting value from table cell in JavaScript…not jQuery

后端 未结 12 1134
后悔当初
后悔当初 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 18:49

    Guess I'm going to answer my own questions....Sarfraz was close but not quite right. The correct answer is:

    alert(col.firstChild.value);
    

提交回复
热议问题