Because the diagram is convenient, copied someone else wrote a Jquerry plug-in, run-time "var pos = ($.browser.msie && parseint ($.browser.version) <= 6)? ' Absolute ': ' fixed '; "Reported uncaught Typeerror:cannot Read property ' msie ' of undefined error.
Search the Internet, http://stackoverflow.com/questions/14923301/. Uncaught-typeerror-cannot-read-property-msie-of-undefined-jquery-tools said that after jquerry1.9, the browser attribute has been removed. On the Jquerry official website looked up the API, indeed has been removed. The official website recommends using the Modernizr library. Do not want to introduce another library, and then surf the Internet to find other solutions, keywords: jquery1.9 browser type. The following is possible (source: http://blog.csdn.net/lyc_2011_acm/article/details/8749177)
To determine the browser type:
$.browser.mozilla =/firefox/.test (Navigator.userAgent.toLowerCase ());
$.browser.webkit =/webkit/.test (Navigator.userAgent.toLowerCase ());
$.browser.opera =/opera/.test (Navigator.userAgent.toLowerCase ());
$.browser.msie =/msie/.test (Navigator.userAgent.toLowerCase ());
The expression after the equal sign returns the True/false, which can be used directly to replace the original $.browser.msie.
Check if it is IE6:
Old
if ($.browser.msie && 7 > $.browser.version) {}
New
if (' undefined ' = = typeof (Document.body.style.maxHeight)) {}
Check if it is IE 6-8:
if (!$.support.leadingwhitespace) {}
Uncaught Typeerror:cannot Read Property ' Msie ' of undefined