counting number of empty inputs with a certain class

前端 未结 3 1363
-上瘾入骨i
-上瘾入骨i 2020-12-16 04:34

I have tried a couple of solutions from previous questions, but no luck. Hoping someone can help me out.

I have a section of a form where fields are dynamically crea

3条回答
  •  伪装坚强ぢ
    2020-12-16 05:11

    $('.user_field').blur(function(){
        alert ($('.user_field').filter('[value=""]').length);
    });
    

    DEMO

提交回复
热议问题