/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<input type="text" name="txt" id="txt" value="Name" onblur="if(this.value.length == 0) this.value='Name';" onclick="if(this.value == 'Name') this.value='';" />