Example:

var sell = document.getElementById("test").cells[0]; // здесь нужно получить и изменить содержимое тега b 
 <table> <tr id="test"><td><b>text</b><div></div></td></tr> </table> 

How can I get and change the contents of the nested b element obtained through a variable?

  • sell.querySelector('b').innerHTML = '...'; - Artem Gorlachev
  • @ArtemGorlachev, what you need, make a comment. I will mark the answer as true. - perfect

1 answer 1

 sell.querySelector('b').innerHTML; 

He and setter and getter