Background to Form Fields

greenspun.com : LUSENET : MCU - Accessible Web Design : One Thread

I once saw a website where once a user clicked in a text box field in a form, the box turned to black lettering on a yellow background, making it easier to see. Then once you filled it in and clicked on the next box, the previous one turned back to the original grey. For the life of me, I can't find this original web site or how to replicate this feature. Can you help? Simon Hodgkinson. Communications Manager, Disabled Living Centres Council

-- Anonymous, March 01, 2004

Answers



-- Anonymous, May 24, 2004

<input name="namn" type="text" id="name" onfocus="this.style.backgroundColor='#ffc'" onblur="this.style.backgroundColor='#fff'" />

-- Anonymous, May 24, 2004

Moderation questions? read the FAQ