<div id="div"></div> <input id="inp"> <script> window.onload = function () { var div = document.getElementById('div'); var inp = document.getElementById('inp'); inp.onkeyup = function () { div.innerHTML = inp.value; } } </script>