Menu
hello, i am a newbie and i have a simple question, i hope you get to help me. thanks! here is my question:
my html code looks like this:
<tr id = 5>
<th> hello </th>
</tr>
now i want to access “hello” using javascript such that i get to underline it and this is what i do:
var refRow = document.getElementById (“5”)
var cell = refRow.cells
cell[0].innerHTML = “<u>cell[0].innerText</u>”
but this doesn’t work, even if I assign cell[0].innerText to a variable such that i have:
var cellText = cell[0].innerText
cell[0].innerHTML = “<u>cellText</u>”
how do i do this? underline “hello”? thanks very much!