Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q753 How can I change an attribute of a tag without using the document.write() method, for example, can I control the bgColor of a table cell?

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

In Internet Explorer 4 you can do this with:

<TABLE><TR><TD ID="myCell">this is a table cell</TD></TR></TABLE>

<SCRIPT LANGUAGE="JavaScript"><!--
if (document.all)
    document.all.myCell.bgColour = '#ff0000';
//--></SCRIPT>

In Netscape Navigator 4 you need to create a layer and then replace the contents of the layer and possibly the whole table to achieve what you want to do.

Feedback on 'Q753 How can I change an attribute of a tag without using the document.write() method, for example, can I control the bgColor of a table cell?'

©2018 Martin Webb