Home  >  Article  >  Web Front-end  >  jquery implements submit submission form_jquery

jquery implements submit submission form_jquery

WBOY
WBOYOriginal
2016-05-16 16:16:141159browse

When using jquery’s submit() function to submit a form, the form cannot always be submitted. This problem is so weird because the name attribute of the input in the form submission form is submit. If you change the name to another name, it can be used.

After the form could be submitted, a new problem arose. Because it is developed based on dz, after the form is submitted, the submitcheck() function is used to check whether the form is submitted. The form submitted by jquery can never be verified. Finally, it is implemented by simulating clicking the submit button.

Copy code The code is as follows:


$('input#asubmit').trigger('click');

The method is very simple and practical. I recommend it to my friends. I hope you all like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn