Fork me on GitHub

js多次调用只有一次有效

https://blog.csdn.net/feijiges/article/details/77949502

 

function ios_weixin(){
        ios_weixin_flag = false;
        var u = navigator.userAgent;
        var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
        if(isiOS){
            console.log(0);
        }
    }
    if(window.ios_weixin_flag==undefined){
        window.ios_weixin_flag = true;
        ios_weixin();
    }

 

posted @ 2018-12-13 16:09  森海轮回  阅读(459)  评论(0编辑  收藏  举报