I have a form with a <textarea> and a <button>. I would like users to be able to select (highlight) all text in the textarea by clicking the button. I know this is possible with <input type="button"> but I can't seem to get it to work with a button tag. Could someone help me out please?

this is what i have so far:

<textarea id="messageBody" style="width:100%;height:200px;border:1px solid #999;" wrap="off"></textarea>
<button onClick="javascript:this.form.frm.focus();this.form.frm.select();" style="background-image:url('images/gradiant_2.png');" class="buttonstylessm">Select All</button>

Thanks in advance,