I know that using $('form').submit() does not work when the submit button is named with the reserved name “submit”.
The annoying thing is that I can’t change the html of the form that I want to submit.
I thought a workaround would be to delete the input button before using $('form').submit(), but that doesn’t seem to work.
$('input:last').remove();
$('form').submit();
Does anybody know another solution for this problem?
You have two choices:
1.Create a formElement and use its
.submitmethods.2.Use the
.submitmethod form the prototype ofHTMLFormElementThe reason is stated in this answer.