Small issues in jquery 1.3.2 IE8

Source: Internet
Author: User

This is what it looks like:

CopyCode The Code is as follows: VaR _ Val = $ ("input [name = 'input1'] [checked]"). Val ();

The result shows that the value of _ Val is undefined. At first, I thought it was wrong. Check that there is no problem, in this way, values can be normally obtained in IE6, 7, FF, chrome, opera, and Safari, that is, IE8 does not work. I was puzzled. Later I tried again:

Copy code The Code is as follows: VaR _ Val = $ ("input [name = 'input1']"). eq (0). Val ();

The value can be obtained, indicating that the problem may occur on the checked attribute of Radio. Try again:

Copy code The Code is as follows: VaR _ Val = Document. getelementsbyname ("input1") [0]. getattribute ("checked ");

The values in IE6, 7, FF, chrome, opera, and Safari are true or false, while those in IE8 are empty,
In IE8:

Copy code The Code is as follows: VaR _ Val = Document. getelementsbyname ("input1") [0]. checked;

It can be set to true or false. I don't know if this is an IE8 bug or does Microsoft have a deep idea?
Last use:

Copy code The Code is as follows: VaR _ Val = $ (": Radio [name = 'input1'] [checked]"). Val ();

In this way, it is normal in various browsers. It is estimated that the test conducted by jquery1.3.2 on IE8 is not comprehensive enough. We hope the next version can solve this problem.

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.