0
我使用Bootstrap和jQuery,并且在将值从FORM传递到PHP时遇到了问题,在这种情况下是同一页面。Jquery使用Bootstrap形成多个字段
我的代码是:
<tr>
<td><input type="text" name="descricao[]" ></td>
<td><span class="spanpreco"><input type="text" name="quantidade[]" ></span></td>
<td><span class="spanpreco"><input type="text" name="preco[]"></span></td>
<td><input type="text" name="subtotal[]" disabled></td>
</tr>
然后我的jQuery是这样的:
$("#adicionar").click(function(){
$("#linha").append('<tr><td><input type="text" name="descricao[]"></td><td><span class="spanpreco"><input type="text" name="quantidade[]" ></span></td><td><span class="spanpreco"><input type="text" name="preco[]"></span></td><td><input type="text" name="subtotal[]" disabled></td></tr>');
});
这里的问题是,当我发布的数据PHP,每一个栏,我动态添加到表单不会传递给PHP,结果行数始终为1。
有人可以帮我吗?
只是一个奇怪的问题,这是怎么'的Twitter bootstrap'有关?我只看到jQuery。也许你会有更好的[Google](https://www.google.nl/search?q=Jquery+form+multiple+fields)结果。 – Xorifelse
你好,你是对的,这是jQuery。谢谢。 –