I'm trying to change the value
on a <textarea>
element. This code works great in Firefox, but IE claims there's an error onblur
and doesn't set the value.
<textarea
name="comment"
id="comment"
rows="8"
cols="80"
style="color:grey;"
onfocus="if(this.value=='Add a comment...') {this.style.color='black'; this.value='';}"
onblur="if(this.value=='') {this.style.color='grey'; this.value='Add a comment...';}">Add a comment...</textarea>
What am I doing wrong?