<div id="searchFieldBox"> <input type="text" id="sf" name="searchquery" onBlur="fieldSwap('sfNorm.png')" onFocus="fieldSwap('sfFocus.png')"> </div>
#sf{ background:url(images/sfNorm.png); background-repeat: no-repeat;
function fieldSwap(image){ var sf = document.getElementById('sf'); if(sf.value == ""){ sf.style.background = "url(images/"+image+") no-repeat"; } }
#sf { ... }
#sf:focus { ... }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)