Chrome (Google chrome) does not support form. submit ($ ('form'). submit) Solution

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.