function name() { document.getElementById('elementid').value = ""; }
<input type="text" value="A new value" onfocus="if(this.value=='A new value') this.value='';">
jQuery("#searchField").focus( function() { $(this).val(""); } );