Sunday, 18 December 2011

onclick empty text box

onclick empty text box


when you click text box then empty text box and when you out text box without enter any words then insert default Value
 
<input name="username" type="text" value="username" onfocus="if(this.value=='username')this.value=''" onblur="if(this.value=='')this.value='username'" />
 See Example



if  you Like this code then Please do the comments

No comments:

Post a Comment