js如何使两个input里的内容实时变化


1
2
3
4
5
6
<input type="text" onkeyup="KeyP(this);" /> <input type="text" id="txt" />
<script>
    function KeyP(v){
        document.getElementById("txt").value = v.value;
    }
</script>
 如上代bai码,在du第一个input里输入,第二zhi个会跟着dao变

猜你喜欢

转载自www.cnblogs.com/apolloren/p/13394326.html