<input type="text" id="inp1" oninput="document.getElementById('div3').innerHTML = this.value.replace(/a/g,'A');"> <div id="div3"></div>