js判断浏览器code
- /// detect a special case of "web browser"
- Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
- !/opera/i.test(navigator.userAgent) );
- Calendar.is_ie5 = ( Calendar.is_ie && /msie 5".0/i.test(navigator.userAgent) );
- /// detect Opera browser
- Calendar.is_opera = /opera/i.test(navigator.userAgent);
- /// detect KHTML-based browsers
- Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);