ajax - 将变量传递给特定行的自动完成

时间:2013-01-28 00:27:44

标签: php ajax

我有这样的代码

            $(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" />

0 个答案:

没有答案