1

你好我有这样的表格

<form id="ricerca" enctype="application/x-www-form-urlencoded" method="post" action=""><table class="inserisci_modifica">
<tr class="visualizza_dati">

<td class="nome_campo"><label for="ragsoc_denominazione">Ragione sociale o denominazione</label></td>
<td class="valore_campo">
<input type="text" name="ragsoc_denominazione" id="ragsoc_denominazione" value="" tabindex="1" /></td>
<td class="nome_campo"><label for="piva">Partita IVA</label></td>
<td class="valore_campo">
<input type="text" name="piva" id="piva" value="" tabindex="9" /></td></tr>

然后我有一个我应用 dataTables 的 html 表

然后我有这个代码

$("#ricerca").submit(function(event) {
    event.preventDefault();
    oTable.fnClearTable();//Empty the entire table of current row information.
    oTable.fnDraw();
});

问题是当我在表单中输入内容时,好像它被自动提交为 dataTables 的搜索字段,然后我可以在 dataTables 搜索字段中看到相同的文本,我不明白为什么

4

1 回答 1

1

没关系,我发现了错误,我正在使用插件,并且在 dataTableExt.oApi.fnSetFilteringDelay 中我不得不更改

anControl = $( 'input', _that.fnSettings().aanFeatures.f );

anControl = $( 'table.dataTables input', _that.fnSettings().aanFeatures.f );
于 2011-02-08T09:57:36.607 回答