It perfectly solves the problem of undefined objects in the IE 9 browser, and IE9 is undefined.
Currently, many users use the IE9 browser on Windows 7, but IE9 has strict compatibility control, resulting in many applications in chrome, firefox, ie6, ie7, ie8 can run normally, and there are various problems in ie9. One of the problems to be mentioned here is that the object is defined, in particular, when multiple layers of iframe/frame are nested on a single page:
Array object undefined
$ The object is not defined.
The jQuery object is undefined.
The Json object is not defined.
Undefined object undefined
* The object is not defined...
In this case, at the beginning,
1. First of all, check whether the JS file path reference is incorrect or the Html file encoding format is incorrect;
2. If these basic functions are normal, check whether the js files we have compiled are placed after the third-party js plug-in or framework we have referenced. Follow the Dom parsing method, we 'd better put our js file in the final parsing.
If both of the above steps are normal and can run normally on chrome, firefox, ie6, ie7, and ie8, then it may be the problem we want to emphasize and the strict problem of ie9, here we can process and add
<Meta http-equiv = "X-UA-Compatible" content = "IE = EmulateIE8"/>
As a compatible method for handling IE9, although Microsoft has moved IE to the standard, in fact, each IE version still has a series of strange rendering phenomena, so for us, in this regard, Microsoft is very guilty and joke.
The above is all the content that xiaobian brings to everyone a perfect solution to the problem of undefined objects in Internet Explorer 9. I hope it will help you and support more customers ~