js、jquery 实时监听input中的值,并赋值到另一个input

<input type="text" name="name" id="searchName" >
<input type="text" name="name_two" id="daochuName" >
<input type="text" name="txt_JEDX" id="txt_JEDX" >
        $(function () {
            $('#searchName').bind('input propertychange',function() {
                    var a= $('#searchName').val();
                $('#daochuName').val(a);
                var fkje = a.replace(/,/g, ""); //大写处理56,000,578数值
                document.getElementById("txt_JEDX").value = atoc(fkje);
                });
        })

 

posted @ 2022-10-10 13:51  尧荣华  阅读(27)  评论(0编辑  收藏  举报