<!DOCTYPE html>
<html>
<head>
</head>
<body>
<textarea onblur="e(this);"></textarea>
<div id="d"></div>
<script type="text/javascript">
function e(ths)
{
var ar = ths.value.split('\n');
for(var i = 0; i < ar.length; i++)
ar[i] = ar[i] + ((/^.*[.]$/.test(ar[i])) ? '' : '.');
document.getElementById('d').innerHTML = ar.join(' ');
}
</script>
</body>
</html>