根据一个input的值改变另一个input的值

Posted Talk is cheap. Show me the cod

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了根据一个input的值改变另一个input的值相关的知识,希望对你有一定的参考价值。

JSP中

1 <input type="text" class="form-control" id="fldy" name="fldy" placeholder="" onchange="fldychange()">

JS中

1 function fldychange(){
2     document.getElementById("fldycopy").value=document.getElementById("fldy").value;
3 }

tip:如果是label,将value改为innerText

以上是关于根据一个input的值改变另一个input的值的主要内容,如果未能解决你的问题,请参考以下文章