Remove Input Value Text On Focus

/ Published in: JavaScript
Save to your folder(s)

Removes default value on focus and replaces on blur

Copy this code and paste it in your HTML
  1. onblur="if (this.value == '') {this.value = 'youDefaultValue';}" onfocus="if (this.value == 'yourDefaultValue') {this.value = '';}"

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.