Recently, the customer reported that some page effects did not respond. After searching, it was found that there was a problem with juqery's Writing Method (jquery obtained the radio value), mainly because some implementation methods were modified in the new version. As follows:
The Code is as follows:
$ ("Input [name = 'isiel'] [checked]"). val ()
$ ("[Name = 'isiel'] [checked]"). val ()
=
The above only applies to earlier versions of IE (IE6 and below)
Later versions of IE or Firefox need to be changed
$ ("Input [name = 'isiel']: checked"). val ()
Test jquer Versions 1.4 and 1.3.2
How to obtain radio from new and old juqery versions
Today, I changed a later version of jquery and found that the original normal method reported an error. After careful searching, I found that jquery's method for obtaining radio is as follows:
New Version (1.3.2, 1.4.2 ):
$ ("[Name = 'Radio _ name'] [checked]"). val (), or $ ("input [name = 'Radio _ name']: checked "). val ()
Old Version:
$ ("[@ Name = 'Radio _ name'] [checked]"). val (), or $ ("[@ name = 'Radio _ name']: checked "). val ()
The difference is that the old version has an additional @ symbol.
PS: When you upgrade jquery, you 'd better first check some information to improve efficiency.