Recently, I have been experimenting with adding a default value to a textfield using the code below:
<textarea name="message" id="message" cols="30" rows="5" value="Comment"
class="form_text text-input shadow" title="Comment"
onblur="if (this.value == '') {this.value = 'Comment';}"
onfocus="if (this.value == 'Comment') {this.value = '';}">
</textarea>
My experience has shown that this method only partially works. Initially, the field does not show the default value of "Comment," but after clicking inside the textarea and then outside without typing anything, it displays "Comment."
I am now seeking advice on how to modify this code so that "Comment" appears when the form loads. Any suggestions would be greatly appreciated.