Hello guys,

First off, I know nothing about JS. Second, I'm looking to achieve the effect of having a search box e.g.

[xhtml]<input type="text" class="search" />[/xhtml]

.search {
background: #fff;
}

But when someone clicks in the search box, I want it to change to

.searchhilite {
background: #000;
}

Then when they exit it change back to:

.search {
backgrond: #fff;
}

I got linked to here: http://www.w3schools.com/jsref/jsref_onfocus.asp however that doesn't fit my needs as when you click out of the box, it's still yellow.

Any help would be greatly appreciated .