使用jquery,我如何找到包含沒有值的輸入的第一個div?jquery - 找到包含空輸入的第一個div
<div class="field">
<input type="text" value="12">
</div>
<div class="field">
<input type="text" value="13">
</div>
<div class="field">
<input type="text">
</div>
<div class="field">
<input type="text">
</div>
$('.field input').filter('text[value=""]').parent().addClass('first_empty')
$( 'div.field輸入').filter(」輸入:text [value =「」]').filter(':first').parent()。css('background-color','green'); – 2012-02-12 02:33:00