我正在获取有价值的表单的最后一个元素,现在我想找到下一个div中的下一个输入元素的id ...
var elem1 =$(':text[name^=distanceSlab][value!=""]').last();
var nextElemId = // find the id of next input element which is in next div
相应的html代码是
<div id ="divid4">
<input type="text" id ="slab4" value ="1"/> // this is the last elemnt which has value
</div>
<div id ="div1d5">
<input type="text" id ="slab5" value =""/> // need to find the id of this element
</id>