代码语言:javascript
const url = document.location.toString();
const urlParmStr = url.slice(url.indexOf('=') + 1);
if (is_weixn_qq()) {
document.getElementById("tips").innerHTML = "请在浏览器打开本页面";
} else {
location.href = urlParmStr; }
function is_weixn_qq() {
const ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return "weixin";
} else if (ua.match(/QQ/i) == "qq") { return "QQ"; } return false; }
猜你喜欢
本站资源仅供研究学习,请勿商用。商用请自行联系软件作者获取授权。如产生法律纠纷,本站概不负责!