faqts : Computers : Programming : Languages : JavaScript : DHTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 1 people (0%) answered Yes
Recently 0 of 1 people (0%) answered Yes

Entry

How do I dynamically alter the style of a horizontal rule from different area of the document?

Aug 22nd, 2001 06:31
Gareth Hay, Jim MacDowell,


The following v. brief example should help you along.
Gaz
<HTML>
<HEAD>
<TITLE>
</TITLE>
<STYLE>
</STYLE>
<SCRIPT>
</SCRIPT>
</HEAD>
<BODY>
<HR id="myrule">
<TABLE><TR><TD 
onclick='document.all.myrule.style.color="red"'>Change</TD></TR></TABLE>
</BODY>
</HTML>