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

Your email address will not be published.