JavaScript, getting value of a td with id name

后端 未结 8 1474
难免孤独
难免孤独 2020-12-01 02:53

Originally I was using input with an id and grabbing it\'s value with getElementById. Currently, I\'m playing with s. How can I grab the values of the

8条回答
  •  悲哀的现实
    2020-12-01 03:29

    If by 'td value' you mean text inside of td, then:

    document.getElementById('td-id').innerHTML
    

提交回复
热议问题