给你个例子,下面的几个操作符按钮可以参考下
<BODY>
<form name="form1" method="post">
<td><textarea name="sdf3" id="sdf3" class="textarea5" style="width:500;height:120"></textarea>
</td>
<table width="790" border="0">
  <tr>
    <td width="164"><br><br><table width="161" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="30" align="center"><input name="newq22" type="button" class="button1"  id="newq2" onClick="sdf3.innerText = sdf3.innerText+'a'" value=" a "></td>
        <td height="30"><input name="newq222" type="button" class="button1"  id="newq22" onClick="sdf3.innerText = sdf3.innerText+'b'" value=" b "></td>
      </tr>
      <tr>
        <td height="30" align="center"><input name="newq223" type="button" class="button1"  id="newq222" onClick="sdf3.innerText = sdf3.innerText+'c'" value=" c "></td>
        <td height="30"><input name="newq224" type="button" class="button1"  id="newq223" onClick="sdf3.innerText = sdf3.innerText+'d'" value=" d "></td>
      </tr>
      <tr>
        <td height="30" align="center"><input name="newq225" type="button" class="button1"  id="newq224" onClick="sdf3.innerText = sdf3.innerText+'e'" value=" e "></td>
        <td height="30"><input name="newq226" type="button" class="button1"  id="newq225" onClick="sdf3.innerText = sdf3.innerText+'f'" value=" f "></td>
<td height="30"><input name="clear" type="reset" class="button1"  id="clear" onclick="document.form1.reset()" value=" clear "></td>
      </tr>
    </table></td>
</BODY>
<input name="addOption" type="button" value="+" onclick="window.clipboardData.setData('text', this.value);document.getElementById('sdf3').focus();document.execCommand('PASTE');">
<input name="addOption" type="button" value="-" onclick="window.clipboardData.setData('text', this.value);document.getElementById('sdf3').focus();document.execCommand('PASTE');">
<input name="addOption" type="button" value="*" onclick="window.clipboardData.setData('text', this.value);document.getElementById('sdf3').focus();document.execCommand('PASTE');">
<input name="addOption" type="button" value="/" onclick="window.clipboardData.setData('text', this.value);document.getElementById('sdf3').focus();document.execCommand('PASTE');">