开发者

Submit form using jquery and submit button

I want to submit form using a input type sub开发者_如何学Gomit with name checkEvent, how can I do that, $('#test').click() doesn't do that and if I use $('#checkFoem').submit() I don't get $_POST['checkEvent'] on the server side.

<form method="post" action="" id="checkFoem">
    <input type="hidden" value="{EVENTID}" name="eventId" />
    <input type="submit" value="{#CHECK}" id="test" name="checkEvent" class="confirm" />
</form>


$("#checkFoem").submit();

This should be enough.


Why not use a hidden input to get whatever value you wanted to catch in the submit?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜