Why Jquery selector by 'value' not work in case of dynamic change

后端 未结 3 1318
误落风尘
误落风尘 2020-12-19 21:32

I\'m not sure why jquery selector value not work, Trying to change the value of inputs to \"a\" but the length not increment, please c

3条回答
  •  -上瘾入骨i
    2020-12-19 21:51

    This works:

    $('body').on('input', '.example', function () 
    {
       $('#result').text( $('.example[value="a"]').val().length );
    });
    
    
    
    
    
    

提交回复
热议问题