How can I get the value of an input in a specific table cell using javascript?

后端 未结 4 767
暖寄归人
暖寄归人 2020-12-18 06:43

I\'m wondering how can I get the value of an input in a specific table cell using javascript?


         


        
4条回答
  •  醉梦人生
    2020-12-18 07:09

    You could use firstChild.value like this:

    var x = document.getElementById("tabela").rows[2].cells[3].firstChild.value;
    

    Demo

提交回复
热议问题