<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=" registration "/>
</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 should does use input names or IDs that conflict with properties of a form, such as SUBM It, 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 Precautions:
The form and its child elements should not use the properties of a form property as name or ID names, such as submit, length, or method, are, will create a conflict. Name collisions can lead to confusing failures. For a complete list of rules, and check for these problem tags, see domlint.
so change the ID of the registration button to "register" and it's OK.
This article is from the "Kitten" blog, please be sure to keep this source http://huzhenjie.blog.51cto.com/863711/1607223
Use $ ("form"). Submit (); Unable to submit