To Clear a Field on Focus using Javascript you can use the following snippet.

Sample Javascript

<input type="text" onfocus="if(this.value == 'value') { this.value = ''; }" value="value" />

5 thought on “How to Clear a Field on Focus using Javascript”

Leave a Reply