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


Comments


You need to login to view comments.