Compatibility of items selected from the drop-down list in different browsers

Source: Internet
Author: User
Jquery is used as a project. When the selected item changes in the drop-down list, the compatibility problem of the selected item text in different browsers is obtained. This article will introduce you to using jquery as a project, when the selected item changes in the drop-down list, the text of the selected item is obtained. I wrote it as follows:

The Code is as follows:


$ ("# Rd"). change (function (){
$ ("# Name"). val ($ ("# rd"). find ("option: checked"). text ());
});


Because the browser versions in the development environment are relatively high, IE10, FF23, Chrome29, and test are all correct. If the client has a problem and the text cannot be obtained, it will be discovered after careful testing, the option should be selected. After it is changed to selected, IE6, 7, 7, 8, 10, FF, and chrome are all correct.

It seems that writing code is still careful. The browser of a higher version is compatible with some attributes, which leads to laziness of programmers!

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.