<input id="inp1" type="text" onkeyup="inp3.value=this.value+' '+inp2.value"> <input id="inp2" type="text" onkeyup="inp3.value=inp1.value+' '+this.value"> <input id="inp3" type="text" readonly>