$('#txt1').keypress(function(){ $('#txt2').val($(this).val()) ; });
<input id="txt1" type="text" onkeyup="document.getElementById('txt2').value = this.value;" /> <br /> <input id="txt2" type="text" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)