js判断微信打开提示在浏览器打开代码
<style type="text/css">
*{margin:0; padding:0;}
a{text-decoration: none;}
img{max-width: 100%; height: auto;}
.weixin-tip{display: none; position: fixed; left:0; top:0; bottom:0; background: rgba(0,0,0,0.8); filter:alpha(opacity=80); height: 100%; width: 100%; z-index: 100;}
.weixin-tip p{text-align: center; margin-top: 10%; padding:0 5%;}
</style>
<div class="weixin-tip">
<p>
<img src="live_weixin.png" alt="在浏览器打开"/>
</p>
</div>
<script type="text/javascript">
$(window).on("load",function(){
var winHeight = $(window).height();
function is_weixin() {
var ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
}
var isWeixin = is_weixin();
if(isWeixin){
$(".weixin-tip").css("height",winHeight);
$(".weixin-tip").show();
}
})
</script>以上代码默认在微信打开就提示“在浏览器打开”,
那如何改为在
<article class="content">
</article>里面所有链接,点击就提示用浏览器打开,不点击就不提示呢?
...全文
相关推荐
微信提示 在浏览器打开 效果实现过程解析
主要介绍了微信提示 在浏览器打开 效果实现过程解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
web页在微信中访问增加遮罩层 右上角弹出在浏览器中打开
web页在微信中访问增加遮罩层 右上角弹出在浏览器中打开
微信判断浏览器自动弹出遮罩层【完整代码】.zip
微信打开页面弹出遮罩层,微信打开页面连接后,提示去浏览器打开。有指示箭头,完美漂亮。js多种选择弹窗。下载添加url地址即可使用。完整版本的
JS判断是否在微信浏览器打开
JS判断是否在微信浏览器打开
用js限制网页只在微信浏览器中打开(或者只能手机端访问)
主要介绍了用js限制网页只在微信浏览器中打开,很多电影站也是这么限制的,需要的朋友可以参考下


