var context = $("#form_40213454w534532432dgtdtreteb34542");
var html = "<tr height='30'>";
html += "<td class='tdCenter' name='sequence' width='50'></td>";
html += "<td class='tdleft' width=''>";
html += "<input name='require' style='width:100%;height:30px;border:none;' onchange='dm.lsproductiondispatchplan.onChangeRequire()'/>";
html += "</td></tr>";
$('#require', context).append(html);
var input_number = $("[name=require]", context);
var len = input_number.length;
$("[name=require]", context).each(function(i) {
var val = $(this).val();
if (val == "" && i != (len - 1)) {
$(this).parent().parent().remove();
}
;
});
// 添加序列号,每回都是重新赋值
var index1 = 0;
$("[name=sequence]", context).each(function() {
index1++;
$(this).text(index1);
});