var tbody = document.getElementsByTagName("tbody")[0]; tbody.rows[i].cells[j].textContent = "тру-ля-ля"; var str = tbody.rows[i].cells[j].textContent;