/*
*
* @function: 判断浏览器类型是否是Safari、Firefox、ie、chrome浏览器
* @return: true或false
*
*/
function isSafari(){
var userAgent = navigator.userAgent.toLowerCase();
if(userAgent.indexOf("safari") > -1 && userAgent.indexOf("chrome") < 0){
return true;
}
return false;
}
function isChrome(){
if(navigator.userAgent.indexOf("Chrome") !== -1) {
return true;
}
return false;
}
function isFirefox(){
if(navigator.userAgent.indexOf("Firefox")>0){
return true;
}
return false;
}
function isMSIE9(){
if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE9.0"){
return true;
}
return false;
}
function isMSIE8(){
if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE8.0"){
return true;
}
return false;
}
function isMSIE7(){
if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.split(";")[1].replace(/[ ]/g,"")=="MSIE7.0"){
return true;
}
return false;
}