Recently solved the website browser compatibility problem in the project, and found that chrome does not support form. submit. After searching online, the solution was finally found. If you need it, refer to it. 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.
// Obtain the form id var form =$ ('# myform '). val (); // obtain the browser parameter 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.