find a value of table cell

前端 未结 1 1896
故里飘歌
故里飘歌 2020-12-04 03:59




        
相关标签:
1条回答
  • 2020-12-04 04:10

    Table cells don't have values, only input elements do. You need to access the <input> element within the table cell.

    Use:

    tbl.rows[i].cells[j].getElementsByTagName("input")[0].value
    

    DEMO

    0 讨论(0)
提交回复
热议问题