我正在获取具有值的表单的最后一个元素,现在我想找到下一个div中的下一个输入元素的id...
相应的HTML代码是:
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>