Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q150 How do I change text within table cells?

irt.org | Knowledge Base | DHTML | Q150 [ previous next ]

Q150 How do I change text within table cells?

The following will only work in Internet Explorer 4+:

<SCRIPT LANGUAGE="JavaScript">
function myClick3() {
    document.all("ONE").innerText = 'This is table cell ONE';
    document.all("TWO").innerText = 'This is table cell TWO';
}
</SCRIPT>

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

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

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


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.