js判断是否在微信浏览器打开

没有在微信浏览器打开的时候:

用浏览器打开后

在这里需要判断箭头是否显示:

var arrows = document.getElementById("arrows");
function is_weixn(){  
    var ua = navigator.userAgent.toLowerCase();  
    if(ua.match(/MicroMessenger/i)=="micromessenger") {  
      //在微信浏览器 arrows.style.display
="block"; } else { arrows.style.display="none"; } } is_weixn();
原文地址:https://www.cnblogs.com/wang715100018066/p/7686513.html