jQuery clear input text on focus
To answer your focus question, yes you can do that:
$("input").focus(function() {
this.value = "";
});
To answer the only allow letters question, this has been asked before.
To filter the input, use
$('input').on('keydown', function(e) {
if( !/[a-z]|[A-Z]/.test( String.fromCharCode( e.which ) ) )
return false;
});
To clear the input field on click
& focus
, use
$('input').on('click focusin', function() {
this.value = '';
});
Be aware of that this event will fire twice, when you click into a non-focused input control in its current form.
Demo: http://jsfiddle.net/xbeR2/