<input id="input" type="text" />
<span id="span"></span>
<script>
var input = document.querySelector("#input);
var span = document.querySelector("#span);
绑定onchange事件
input.onchange=function(){
span.innerHTML=this.value
}
</script>
标签:span,绑定,js,querySelector,双向,input,onchange From: https://www.cnblogs.com/123abcde/p/16865762.html