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?

12 of 26 people (46%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

How can I change the background of a <div> in JavaScript?

Nov 12th, 2001 21:59
Alessio Bellisomi, Janos Smith,


This shoud help.. it works on IE4 or later. Bye!
<HTML>
<BODY TEXT="000000" BGCOLOR="FFFFFF">
<DIV ID="section">JavaScript - FAQTS</DIV><BR>
<INPUT TYPE=button onClick="document.all.section.style.backgroundColor 
= '#66FFFF'" VALUE="OK">
</BODY>
</HTML>