<input type="button" id="button" value="Кнопка" />
<div id="text"></div>
<script>
var rnd =(min, max)=> Math.floor(Math.random() * (max - min)) + min;
var arr = [' ',',','.'];
button.onclick = function() {
var str = '', i = 1000;
while (i--) {
var num = rnd(1040, 1107);
if(num<=1103) str+= String.fromCharCode(num);
else str+= arr[num-1104];
}
text.innerHTML = str;
};
</script>