How to auto-hide placeholder on focus in <input type="text"> using JavaScript

1 Answer

0 votes
<input type="text" name="tags" placeholder="tag1,tag2" onfocus="this.placeholder=''" 
                               onblur="if (this.placeholder == '') {this.placeholder='tag1,tag2';}">


answered Apr 15, 2015 by avibootz
edited Apr 15, 2015 by avibootz
...