由于微信的限制,应用文件在内置浏览器中下载全部被屏蔽掉,造成很多人用微信扫描二维码下载时,界面显示一片空白,容易误导以为在下载呢

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>下载示例</title>

<style type="text/css">
#weixin-tip {
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.8);
    filter: alpha(opacity = 80);
    width: 100%;
    height: 100%;
    z-index: 100;
}

#weixin-tip p {
    text-align: center;
    margin-top: 10%;
    padding: 0 5%;
}
</style>

</head>

<body>
    <div id="weixin_tip" style="width: 100%; height: 100%;">
        <p>
            <img src="live_weixin.png" alt="微信打开" style="width: 100%; height: 100%;" />
        </p>
    </div>
</body>

<script type="text/javascript">
    function is_weixin() {
        var ua = navigator.userAgent.toLowerCase();
        if (ua.match(/MicroMessenger/i) == "micromessenger") {
            return true;
        } else {
            return false;
        }
    }

// 微信内置浏览器打开,只是显示遮罩层,其他浏览器进行连接跳转
    if (is_weixin()) {
        document.getElementById("weixin_tip").style.display="block";
    } else {
        document.getElementById("weixin_tip").style.display="none";
        window.location.href = "这里修改为自己的下载地址";
    }
</script>
</html>

最新文章

  1. 用lucene替代mysql读库的尝试
  2. 网页webp转非webp的jpg gif png 图片
  3. 新手程序员随笔2——初识html、css和javascript
  4. UIApplicationDelegate
  5. 【HTML5】地理定位
  6. The Ninth Hunan Collegiate Programming Contest (2013) Problem L
  7. sharepoint Linq方式的增,删,查,改
  8. python - os.path,路径相关操作
  9. java 显示目录下全部文件
  10. Effective C++:条款14:在中小企业资源管理copying表现
  11. 下一个项目为什么要用 SLF4J
  12. 在Pypi上发布自己的Python包
  13. java中的对象
  14. IIS的安装与设置(windows版本)
  15. 【Android学习笔记】Android Studio简单断点调试
  16. vue面试题总结
  17. 使用bootstrap-select有时显示“Nothing selected”
  18. js 面向对象 ES5 AND ES6
  19. BZOJ2157 边转点 树链剖分
  20. 解开一个疑惑,为什么LVS开放的端口,使用netstat或ss命令,不能查找到其监听的端口呢?

热门文章

  1. nodejs基础快速上手
  2. 多态 鸭子类型 反射 内置方法(__str__,__del__) 异常处理
  3. 14: linux实用命令
  4. 国际空间站直播 ISS直播
  5. 【Alpha】Scrum Meeting 11
  6. Page.Cache
  7. windows服务器环境问题---api-ms-win-crt-runtimel1-1-0.dll缺失解决
  8. 2018年底,IOS面试题的复习之OC的反射机制
  9. vue数据变动监测
  10. suse源