it's so simple to remove placeholder text on focus on text field
and get it back on blur if no text write inside text field.
we use two function onfocus and onblur to do this.see below Example:
<input type="text" placeholder="write text here" onfocus="this.placeholder = ''" onblur="this.placeholder = 'write text here'" />
<a href="https://jsfiddle.net/mukesh89/qf2jwbmy/1/#" target="_blank"> Demo</a>
and get it back on blur if no text write inside text field.
we use two function onfocus and onblur to do this.see below Example:
<input type="text" placeholder="write text here" onfocus="this.placeholder = ''" onblur="this.placeholder = 'write text here'" />
<a href="https://jsfiddle.net/mukesh89/qf2jwbmy/1/#" target="_blank"> Demo</a>
great blog
ReplyDeleteAws institutes in hyderabad