Solution to the problem that IE8 does not support the jQuery version: You can load the corresponding version of jQuery by determining the version of the IE browser. Only IE8 can recognize [ ], and some compatible operations can be performed in IE8 mode.
The operating environment of this tutorial: windows7 system, jquery2.0.2 and jquery1.11.1 versions. This method is suitable for all brands of computers.
Solution to the problem that IE8 does not support the jQuery version:
You can load the corresponding version of jQuery by determining the version of the IE browser
Use statementSome compatible operations can be performed in IE8 mode. The code is as follows:
Explanation:
If it is not IE, use 2.02, IE8 and above also use 2.0.2, IE8 and below use version 1.11
Other matters:
1. I originally wanted to use if else, but I heard that else is not recommended, so I used two if
2. I see that the code for judging non-IE is a little different. The following is the explanation:
In non-IE, the following code is recognized as a comment and will be ignored:
But the following code is different, there is a sentence sandwiched between the two comments Code, will be ignored in IE, but will be recognized in non-IE.
IE ignores this
Related learning recommendations:javascript video tutorial
The above is the detailed content of What to do if IE8 does not support the jQuery version?. For more information, please follow other related articles on the PHP Chinese website!