Link to home
Start Free TrialLog in
Avatar of Fern2
Fern2Flag for Iceland

asked on

Javascript change value of textbox on click (select)

I have a textinput were I need to change value if clicked on or selected. Normal state is novalue and if selected the value changes to "H" and if the textbox id selected again it should go back to normal state "no value"
Avatar of Pravin Asar
Pravin Asar
Flag of United States of America image

<input type="text" onfocus="this.value='H';" onblur="this.value='no value';">
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
whoops...  sorry pravinasar
Avatar of Fern2

ASKER

Thanx a lot :-)