码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2018-02-06 12:51:03      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:color   type   input   ext   class   function   text   for   style   

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的值

标签:color   type   input   ext   class   function   text   for   style   

原文地址:https://www.cnblogs.com/zhuziyu/p/8421498.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!