数据表搜索因其他表单的输入而混乱
你好,我有一个像这样的表单
<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>
,然后我有一个 html 表,我将 dataTables 应用到其中
,然后我有这段代码
$("#ricerca").submit(function(event) {
event.preventDefault();
oTable.fnClearTable();//Empty the entire table of current row information.
oTable.fnDraw();
});
,问题是当我在表单中输入某些内容时,就好像它作为 dataTables 的搜索字段自动提交,然后我可以在数据表搜索字段中看到相同的文本,我不明白为什么
hello i have a form like this
<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>
then i have an html table to which i apply dataTables
and then i have this code
$("#ricerca").submit(function(event) {
event.preventDefault();
oTable.fnClearTable();//Empty the entire table of current row information.
oTable.fnDraw();
});
the problem is when i type something in my form, it's as if it gets auto submited as dataTables's search field, and then i can see the same text in dataTables search field, i can't understand why
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系,我发现了这个错误,我正在使用一个插件,并且在 dataTableExt.oApi.fnSetFilteringDelay 中
我不得不
改为
nevermind i find the bug, i am using a plugin, and in dataTableExt.oApi.fnSetFilteringDelay
i had to change
to