• 判断是否来自微信内置浏览器还是不是来自微信内置浏览器


    function isWeiXin() {
    var ua = window.navigator.userAgent.toLowerCase();
    // console.log(ua);//mozilla/5.0 (iphone; cpu iphone os 9_1 like mac os x) applewebkit/601.1.46 (khtml, like gecko)version/9.0 mobile/13b143 safari/601.1
    if (ua.match(/MicroMessenger/i) == 'micromessenger') {
    return true;
    }
    else {
    return false;
    }
    }
    if(isWeiXin()){
    that.Trigger = '是来自微信内置浏览'
    }
    else{
    that.PorjectOut = true 
    that.Trigger = '不是来自微信内置浏览器'
    // console.log("不是来自微信内置浏览器");}
  • 相关阅读:
    Map
    Collection接口之Set
    Collection接口之List、泛型
    简介
    递归
    File类
    转换流InputStreamReader、OutputStreamWriter
    springmvc
    集合
    SpringCloud学习笔记
  • 原文地址:https://www.cnblogs.com/wuliujun521/p/11359709.html
Copyright © 2020-2023  润新知