我正在尝试检测浏览器是否是 Safari。如果是这样,那就做点什么吧。在所有其他浏览器中,执行其他操作:
if ( navigator.userAgent.toLowerCase().indexOf('safari') == -1) {
//if safari execute some function
} else {
// if other browsers execute other function
}
但是,我想我没有使用正确的方法,因为它不起作用。 :P
if(typeof navigator.vendor!='undefined') &&
navigator.vendor.toLowerCase().indexOf('apple')!=-1){
...
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)