<input id="input1" onkeyup="document.getElementById('input2').value=this.value" /> <input id="input2" />