Copy text of a field into another automatically

后端 未结 8 1199
攒了一身酷
攒了一身酷 2020-12-16 08:32

I need to copy the text entered in a field (whether it was typed in, pasted or from browser auto-filler) and paste it in another field either at the same time or as soon as

8条回答
  •  自闭症患者
    2020-12-16 08:40

    $(document).ready(function() {
     $('.textBox1').on('change', function() {
       $('.textBox2').val($(this).val());
     }); 
    });
    
    
    

提交回复
热议问题