How do I implement onchange of <input type=“text”> with jQuery?

后端 未结 14 1059
[愿得一人]
[愿得一人] 2020-11-27 10:15

?

14条回答
  •  有刺的猬
    2020-11-27 11:14

    This worked for me. If field with name fieldA is clicked or any key entered it updates field with id fieldB.

    jQuery("input[name='fieldA']").on("input", function() {
        jQuery('#fieldB').val(jQuery(this).val());
    });
    

提交回复
热议问题