<input type="text" id="inp"> <input type="text" id="val">
var val=document.getElementById('val'); var inp=document.getElementById('inp'); val.onchange=function(e){ //弹出value //alert(e.target.value); // 将value值赋给另一个input inp.setAttribute('value',e.target.value) }
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号