Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q150 How do I change text within table cells?

You are here: irt.org | FAQ | DHTML | Q150 [ previous next ]

The following will only work in Internet Explorer 4+:

function myClick3() {
    document.all("ONE").innerText = 'This is table cell ONE';
    document.all("TWO").innerText = 'This is table cell TWO';

<TR><TD ID="ONE">This is the text in ONE</TD></TR>
<TR><TD ID="TWO">This is the text in TWO</TD></TR>

<FORM><INPUT TYPE="BUTTON" VALUE="Click Me" onClick="myClick3()"></FORM>

Feedback on 'Q150 How do I change text within table cells?'

©2018 Martin Webb