<html>
<head>
<script type="text/javascript">
function addText(text){
document.getElementById('foo').value += text;
}
</script>
<body>
<form>
<textarea id="foo"></textarea>
</form>
<a href="#" onClick="addText('A')">Click here to add "A" to text
area.</a><br>
<a href="#" onClick="addText('B')">Click here to add "B" to text
area.</a>
</body>
</html>