/ Published in: JavaScript
Removes default value on focus and replaces on blur
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
onblur="if (this.value == '') {this.value = 'youDefaultValue';}" onfocus="if (this.value == 'yourDefaultValue') {this.value = '';}"