StupidBeauty
Read times:745Posted at:Fri Sep 27 01:21:49 2013
- no title specified

转载:jQuery 1.9 移除了 $.browser 的替代方法

javascript中可使用 $. browser . mozilla = /firefox/ . test ( navigator. userAgent . toLowerCase ()) ; 这样一句代码来判断当前浏览器是不是火狐。

http://www.fwolf.com/blog/post/35

亮点:

判断浏览器类型:

$.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 等。

办公室女郎

办公室女郎

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4