dv.2,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script type="text/javascript">
var arr = ['1', '2', '3', '4'];
function myfunc(){
document.myForm.myTextarea.value += (arr[Math.floor(Math.random()*arr.length)]);
}
</script>
</head>
<body>
<form name="myForm">
<input type="button" value="Нажми меня" onclick="myfunc()" />
<textarea value="0" name="myTextarea">0</textarea>
</form>
</body>
</html>