What\'s the best way to have a text input field that displays instructions of what to enter in that field in gray. When you focus on that input field, the gray instruction text
<input type="text" id="user" class="textbox default" value="Enter login name">
<input type="password" id="pass" class="textbox">
$(function(){
$('.textbox').focus(function(){
if (this.value == this.defaultValue) {
this.value = '';
$(this).removeClass('default');
};
}).blur(function(){
if (this.value == '') {
this.value = this.defaultValue;
$(this).addClass('default');
};
});
});