zoukankan      html  css  js  c++  java
  • 实在自动现在APK,微信跳浏览器下载

    <!DOCTYPE html>
    <html lang="zh-CN">

    <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>demo</title>
    <!-- Bootstrap -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">


    </head>
    <style>
    .container {
    background: url(images/bg.png) no-repeat;
    background-size: cover;
    padding-right: 0px;
    padding-left: 0px;
    }
     
    .container-fluid {
    padding-right: 0px;
    padding-left: 0px;
    overflow: hidden;
    }
     
    .bg {
    100%;
    height: 100vh;
    }
     
    .col-xs-12 {
    padding-right: 0px;
    padding-left: 0px;
    }
     
    .col-xs-12 img {
    margin: 0 auto;
    }
     
    .logo {
    62px;
    height: 62px;
    }
     
    .bottom_ {
    position: relative;
    }
     
    .bottom_ .down {
    position: absolute;
    top: 3.5rem;
    right: 4rem;
    height: 35%;
    }
     
    .shade {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5)
    }
    </style>

    <body onload="myfunction()">
    <div class="container" onclick="test()">
    <div class="container-fluid">
    <div class="row">
    <div class="col-xs-12">
    <img src="images/logo.png" style="margin-top: 35px" class="img-responsive logo" alt="Responsive image" onclick="return false">
    </div>
    <div class="col-xs-12 pos">
    <img src="images/redpacket.png" style="margin-top: -80px" class="img-responsive" alt="Responsive image" onclick="return false">
    </div>
    </div>

    <img src="images/shade.png" alt="" class="shade">
    </div>
    </div>
    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery,所以必须放在前边) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    </body>

    </html>
    <script type="text/javascript">
    function myfun() {

    var ua = navigator.userAgent.toLowerCase();
    if (ua.match(/MicroMessenger/i) == "micromessenger") {
    var u = navigator.userAgent;

    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端

    var isiOS = !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

    if (isAndroid == true) {
    // location.href = "http://uri6.com/tkio/3aEfmya"
    // console.log("111")
    if ($(".shade").css("display") == "none") {
    $(".shade").show();
    } else {
    $(".shade").hide();
    }
    } else {
    // location.href = "http://uri6.com/tkio/VNbqAja"

    }

    } else {
    var u = navigator.userAgent;

    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端

    var isiOS = !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端


    if (isAndroid == true) {
    location.href = "http://uri6.com/tkio/zeuAJ3a"
    // console.log("111")
    // if ($(".shade").css("display") == "none") {
    // $(".shade").show();
    // } else {
    // $(".shade").hide();
    // }
    } else {
    // location.href = "http://uri6.com/tkio/VNbqAja"

    }
    }
    }
    /*用window.onload调用myfun()*/
    window.onload = myfun; //不要括号

    function test() {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.match(/MicroMessenger/i) == "micromessenger") {
    var u = navigator.userAgent;

    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端

    var isiOS = !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端

    if (isAndroid == true) {
    // location.href = "http://uri6.com/tkio/3aEfmya"
    // console.log("111")
    if ($(".shade").css("display") == "none") {
    $(".shade").show();
    } else {
    $(".shade").hide();
    }
    } else {
    // location.href = "http://uri6.com/tkio/VNbqAja"

    }

    } else {
    var u = navigator.userAgent;

    var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端

    var isiOS = !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端


    if (isAndroid == true) {
    location.href = "http://uri6.com/tkio/zeuAJ3a"
    // console.log("111")
    // if ($(".shade").css("display") == "none") {
    // $(".shade").show();
    // } else {
    // $(".shade").hide();
    // }
    } else {
    // location.href = "http://uri6.com/tkio/VNbqAja"

    }
    }
    }
    </script>
    location.href = ""  是APK的链接包, IOS直接跳转APPstore  安卓实现跳到浏览器后提示下载
  • 相关阅读:
    leetcode 18 4Sum
    leetcode 71 Simplify Path
    leetcode 10 Regular Expression Matching
    leetcode 30 Substring with Concatenation of All Words
    leetcode 355 Design Twitte
    leetcode LRU Cache
    leetcode 3Sum
    leetcode Letter Combinations of a Phone Number
    leetcode Remove Nth Node From End of List
    leetcode Valid Parentheses
  • 原文地址:https://www.cnblogs.com/ylblogs/p/11112495.html
Copyright © 2011-2022 走看看