Jquery1.9版本中$.browser已被剔除:
判断浏览器类型:
++复制代码++ 代码如下:
$.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());
等号后面的表达式返回的就是 true/false, 可以直接用来替换原来的 $.browser.msie 等。
检查是否为 IE6:
++复制代码++ 代码如下:
// Old
if ($.browser.msie && 7 > $.browser.version) {}
// New
if ('undefined' == typeof(document.body.style.maxHeight)) {}
检查是否为 IE 6-8:
++复制代码++ 代码如下:
if (!$.support.leadingWhitespace) {}
 51工具盒子
51工具盒子 
                 
                             
                         
                         
                         
                        ![shell编程中数值运算(linux shell 数值运算)(( ))bc let $[] expr](http://static.51tbox.com/static/2024-08-29/col/e4841a99e9f10311529a3cef1697d086/0e09dc32c1994a91b4bc920f9e574ee0.png.jpg)