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?
精彩评论