Jquery submit () cannot submit the problem

Source: Internet
Author: User

Copy codeThe Code is as follows:
<Form action = "register. php" method = "post">
<Div class = "loginform_row">
<Label> User name: </label>
<Input type = "text" class = "loginform_input" id = "name" name = "name"/> <div id = "nameerror"> </div>
</Div>
<Div class = "loginform_row">
<Label> password: </label>
<Input type = "text" class = "loginform_input" id = "pass" name = "pass"/> <div id = "passerror"> </div>
</Div>
<Div class = "loginform_row">
<Label> Email: </label>
<Input type = "text" class = "loginform_input" id = "email" name = "email"/> <div id = "emailerror"> </div>
</Div>
<Div class = "loginform_row">
<Input type = "button" class = "loginform_submit" id = "submit" value = "register"/> change to <input type = "button" class = "loginform_submit" id =" register "value =" register "/>
</Div>
<Div class = "clear"> </div>
</Form>
$ ("# Submit"). click (function (){
$ ("Form"). submit ();
});

The above Code cannot submit the form when you click the register button

Cause
Additional Notes:
Forms and their child elements shocould not use input names or ids that conflict with properties of a form, such as submit, length, or method. name conflicts can cause confusing failures. for a complete list of rules and to check your markup for these problems, see DOMLint.

Other considerations:
The form and its child elements should not use the attribute of a form as the name or id, such as submit, length, or method. Yes, conflicts will occur. Name Conflict may cause confusion and failure. For a complete rule list, check the problem tags and check DOMLint.
So change the Registration button id to "register" and then OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.