php - how to receive form data submitted with jquery submit() -
how can form data if form submitted jquery submit()
function? example
<form action="<?=$php_self;?>" method="post" id="someform"> name: <input type="text" name="name" id="name" /><br /> email: <input type="text" name="email" id="email" /><br /> </form>
which submit jquery like:
$("#someform").submit();
how can receive fields name , email if form submitted? thanks
just use $('#name').val()
, $('#email').val()
in submit callback(
$('#form').submit(function() { alert($('#name').val()); });
for example)
Comments
Post a Comment