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 idvar form of the 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 SUBMITform. submit ();}
Articles you may be interested in
- Summary of JS methods for determining browser types (IE firefox chrome opera safari)
- Javascript determines whether the mouse is left or right-click-compatible with ie, firefox, chrome, and other major browsers
- Js obtains the height of the scroll bar from the top and bottom of the browser. It is compatible with ie and firefox.
- PHP force browser not to cache
- Common Values of Cache-control include private, no-cache, max-age, and must-revalidate.
- How to solve the problem that the DIV layer is covered by Flash (compatible with IE and Firefox browsers) and how to display the DIV layer on FLASH
- The css setting layer is transparent and compatible with all browsers.
- Invincible firewheel effect in the address bar of JavaScript Browser