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.