【发布时间】:2010-05-27 16:33:53
【问题描述】:
我正在尝试在 html 表单中的提交按钮上引发点击事件。 我使用 .click() jquery 来捕捉点击事件并在函数结束时返回 true。 当我点击提交按钮时,会引发 jquery 函数并执行回调,但 $_POST 数组为空。
我该如何解决这个问题?
代码:
<form action="index.php?p=searchexlibris&t=palabre" method="post" id="frmSearchexlibris">
<input type="text" name="palabre" id="palabre" value="" />
<input class="searchbutton" id="exlibrisbutton" type="submit" value="Buscar" />
</form>
在 javascript 函数中: $('#exlibrisbutton').click(function(){ enableDisableFormExlibris('exlibrisbutton',false); 返回真; });
在捕获提交的函数中,我得到一个空的 $_POST,而当我不调用 javascript 函数时,帖子可以工作。
【问题讨论】:
-
你能发布你的代码吗?
-
我们是盲人,99% 的时间我们只能在 SO 中工作