有没有比这样遍历更好的方法?
$('#part'+rowNumber).parent().parent().next().children('input').val(manufacturer);
有问题的 DOM 段是:
var html = '<div class="row-fluid">';
html += '<div class="span1"><img title="Remove part." class="pull-right remove-part" width="20px" src="http://www.view.com/public_html/images/icons/minus.png"></div>';
html += '<div class="span1"><input type="number" value="1" class="span12"/></div>';
html += '<div class="span5"><input id="part'+rowNumber+'" type="text" class="span12"/></div>';
html += '<div class="span4"><input type="text" class="span12 last"/></div>';
html += '<div class="span1"></div>';
html += '</div>';