It seems you are trying to do what you get the instructions in the text box, and then if you delete the value you get, follow the instructions again. try it
<textarea id="a">Message</textarea> var standard_message = $('#a').val(); $('#a').focus( function() { if ($(this).val() == standard_message) $(this).val(""); } ); $('#a').blur( function() { if ($(this).val() == "") $(this).val(standard_message); } );
You can see how it works here .
source share