It sounds very complicated. Let's try to construct a text box with text showing default values, it will be focused on loading and it will be vanished when the form is submitted.
1. In order to memorized the default text to differentiate if the user have modified the textbox or not, the default value should not store in the value attribute of the text box. In this case, I choose the rel property as an example.
2. If the user simply press the delete button, that's the same case as if the user input nothing. It's better to display the default value again.
3. Different colour showing default value show be more user friendly, since it alert the user that he hasn't input anything.
4. The form containing the input box should be added with an automatic script for clearing the content of the text box on submit.
5. I've used the class name "jqy-DefaultText" as illustration.
6. For fast development, allow me to use the jQuery library. Actual this code can be written without any library.
I've added all this to the following code:
I've put it online at
here