Home › Forums › JavaScript › Styling Input Field w/ JavaScript onfocus & onblur › Re: Styling Input Field w/ JavaScript onfocus & onblur
June 5, 2009 at 1:04 pm
#58636
Member
To get it to change from stars to text you would include these in your onfocus and onblur events:
onfocus="this.type=’password’ onblur if(this.value==”){this.value=’Enter your email…’; this.type=’text’;}"
and start it off as type="text". be sure not to allow it to turn back to text if anything is entered into the box or it will reveal the password.