I'm looking for a script that will clear a text field of it's default info with one click. For example if I had a contact form that wanted an email address, I'd have the value of the text fiend set to "Enter your email address". Then when the user clicked in the form field once, the text would dissappear all at once.
onfocus= 'if (this.value=="Enter your email address") this.value=""'
However, adding this event handler inline is not very good design -- it might be a hassle but maybe you should write a function populates your form with the default values and then adds the onfocus event handler when the window loads. Remember to use the getElementbyId test to ensure the user has Javascript enabled.
If you're up for playing with a speck of jQuery in the process I tossed together this example page that self-clears and refills if empty. But only when the field contains default content. So if someone has entered an address and clicks again it won't get wiped out. And without the inline JS. ;)