Chrome does not support form. submit Solutions
Recently, some people in the Q group said that chrome (Google chrome) does not support the form. submit method. Find a solution. I tested it myself and found that chrome really does not support form. submit: Jquery is used for testing, and it is not supported. So after studying for a long time, I finally found a solution.
?
1 2 3 4 5 6 7 8 9 10 11 12 |
// Obtain the id of the form. Var form = $ ('# myform'). val (); // Obtain browser Parameters Var browserName = navigator. userAgent. toLowerCase (); If (/chrome/I. test (browserName) &/webkit/I. test (browserName) &/mozilla/I. test (browserName )){ // If it is a chrome browser Var tmp = theform. attr ('edit '); $. Post (tmp, theform. serialize ()); } Else { // Execute SUBMIT Form. submit (); } |
The above is all the content of this article. I hope you will like it.