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。謝謝。 –