我有这样的代码
$(function() {
$('.serial_number').live('focus.autocomplete', function() {
$(this).autocomplete("/admin/includes/getinvoiceajax.php", {
width: 300,
matchContains: true,
mustMatch: true,
selectFirst: false
});
});
});
它从表中获取序列号列表。现在它只是获取整个列表,但我想将一个变量 [man_part_number] 传递给它,以便我可以改进我的结果。问题是我无法弄清楚当 man_part_number 从输入字段到输入字段时如何传递。它需要匹配该特定行。我想也许我可以序列化这个。
<input type="hidden" name="man_part_number[]" id="man_part_number" class="man_part_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
<input type="hidden" name="man_part_number[]" id="man_part_number" class="man_part_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
<input type="hidden" name="man_part_number[]" id="man_part_number" class="man_part_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />
<input type="hidden" name="man_part_number[]" id="man_part_number" class="man_part_number" />
<input type="text" name="serial_number[]" id="serial_number" class="serial_number" />