Place holder using javascript
Posted by navaneeth on Jan 13, 2013 in HTML, Javascript | No comments yet
By using javascript we can create placeholder which is compatible with the older browsers which didn’t support the new placeholder
and here is the code on how we can do this
<input name="location" type="text" value="Location" onblur="this.value=!this.value?'Location':this.value;" onclick="this.value='';" />
Leave a Reply