onblur in textarea

liunx

Guest
I have a textarea and an input field.<br />
<br />
I have initial values on both of them. Here is the code:<br />
<br />
Your message<TEXTAREA name=message onblur="if(this.value=='')this.value='test';" onfocus="if(this.value='test')this.value='';" cols=20 rows=3></TEXTAREA><br><br />
<br />
user<INPUT name=user onblur="if(this.value=='')this.value='user';" onfocus="if(this.value=='user')this.value='';" size=12 value=user><br />
<br />
The input field can display "user" and it is disappeared when i click that field.<br />
<br />
But, the textarea cannot display "test" when I load the form. How can I fix it?<br />
<br />
<br />
:confused:<!--content-->Try this:<br />
<br />
<TEXTAREA name=message onblur="if(this.value=='')this.value='test';" onfocus="if(this.value='test')this.value='';" cols=20 rows=3>test</TEXTAREA><br><br />
<br />
<br />
....Willy<!--content-->It works now. <br />
<br />
Thank you for your kind help.<br />
<br />
kero<!--content-->
 
Back
Top