vendredi 27 mars 2015

jQuery: Submit with input name

I have a <form id="foo" action="bar.php" method="post"> that has 2 submit buttons, name="save" and name="lock".


I'm running a jquery function:



$("a#submit").click(function() {
$("#foo").submit();
});


How can I tell jQuery to submit the name lock and not the other one?


Aucun commentaire:

Enregistrer un commentaire