Jquery-based button default enter event (carriage return event ). _ Jquery-js tutorial

Source: Internet
Author: User
Here I will introduce the default press enter event of the button. If you can use submit, you do not need to read the following code, because submit can directly use the default press enter event (enter). Here we declare that the code is completed through jquery. The real-column code I personally wrote can be fully implemented. It can be used as long as it is copied, but it must be imported into the jquery package. This method supports ie and Firefox. When I was doing this, I found some code on the Internet, which basically does not support Firefox. Well, I have talked a lot about it. Start code demonstration. Thank you for choosing the correct one.

The Code is as follows:





Enter events supported by Firefox and IE

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.