document.querySelector("#input").onchange= function () { document.querySelector("#span").innerHTML = this.value; }