Greetings everyone, I have defined the following styles in my CSS:
.on_focus {
background-color:yellow;
}
.off_focus {
background-color:white;
}
Now, within my form, there is this input field:
<label>Last Name</label><br/>
<input id="l_name" class="text" type="text" name="l_name" maxlength="20" onfocus="this.className='on_focus'" onblur="this.className='off_focus'"/><br/><br/>
While this functionality works perfectly in Fire Fox, it seems to be malfunctioning in Internet Explorer. In IE, the background color of the input field remains white regardless of whether it has focus or not. Can anyone shed some light on why this discrepancy exists?