function isWeChat(){var ua = window.navigator.userAgent.toLowerCase();if(ua.match(/MicroMessenger/i) == 'micromessenger'){var system = {win: false,mac: false};//检测平台var p = navigator.platform;system.win = p.indexOf("Win") == 0;system.mac = p.indexOf("Mac") == 0;if (system.win || system.mac) {alert("在微信PC端上打开内置浏览器");}else {alert("非微信PC端上打开内置浏览器");}}
如果觉得《js判断是否微信PC端打开内置浏览器》对你有帮助,请点赞、收藏,并留下你的观点哦!