let url = navigator.userAgent.toLowerCase(); //Use toLowerCase to convert all strings to lowercase for us to judge and use if (url.indexOf("15b202 qq") > -1) { // Judge QQ built-in browser separately alert("QQ APP has a built-in browser, do what you want to do"); } if (url.indexOf("micromessenger") > -1) { // Separately judge the WeChat built-in browser alert('WeChat's built-in browser, do what you want'); } if (url.indexOf("15b202") > -1) { //Determine the built-in browser of WeChat and the built-in browser of QQ alert("QQ and WeChat have built-in browsers, do what you want"); }
Regularly judge the built-in browser of QQ and the built-in browser of WeChat
Guess you like
Origin http://10.200.1.11:23101/article/api/json?id=326626624&siteId=291194637
Ranking