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

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?

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

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?

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?'


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.