<textarea name="start" cols="50" rows="10"></textarea>
<textarea name="out" cols="50" rows="10"></textarea>
<script type="text/javascript">
var s = document.getElementsByName('start')[0],o = document.getElementsByName('out')[0];
s.onkeyup = s.onkeypress = function ()
{ var text = this.value.replace(/^(.*?)$/gm,"111$1222")
o.value = text
}</script>