На вскидку:
<script>
window.onload = function() {
var input = document.getElementById('input'),
array = ['focus', 'blur'],
i = array.length;
while(i--) {
input['on'+array[i]] = function() {
var _default = this.defaultValue;
this.value = this.value == _default ? '' : this.value || _default;
};
}
};
</script>
<input type="text" value="text" id="input" />