- /// 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);
转载于:https://www.cnblogs.com/jinweijie/archive/2007/10/12/922194.html