var sUserAgent = navigator.userAgent.toLowerCase(); if(sUserAgent.indexOf(“baidu”) > 0) { alert(“百度浏览器”); }