zoukankan      html  css  js  c++  java
  • 根据浏览器判断是下载IOS还是其它的手机安装包

    http://tiao.67767.cn/DownLoad.aspx?cid=3509

       
       
      <!DOCTYPE html>
      <html>
      <head>
      <meta http-equiv="content-type" content="text/html;charset=utf8" />
      <title>超好玩的经典捕鱼</title>
      <meta name="author" content="Fee">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
      <meta name="apple-mobile-web-app-capable" content="yes">
      <style type="text/css">
      /*body { 100%; }*/
      body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dialog, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td {margin: 0;padding: 0;}
      button, input, select, textarea {font: 12px/1.5 arial,tahoma,simsun,sans-serif;font-size: 100%;overflow: visible;}
      h1, h2, h3, h4, h5, h6 {font-size: 100%;font-weight: normal;}
      address, cite, em, var {font-style: normal;}
      code, kbd, pre, samp {font-family: courier new,courier,monospace;}
      ul, ol{list-style: none;}
      a, a:hover {outline: none;text-decoration: none;}
      legend {color: #333;}
      fieldset, img {border: 0 none;vertical-align: top;}
      table {border-collapse: collapse;border-spacing: 0;}
      article, aside, details, figcaption, figure, footer, header, menu, nav, section, time, audio, video {display: block; margin: 0;padding: 0;}
      html{font-size: 14px;height: 100%;}
      .clearfix:before,.clearfix:after{content:""; display:table;}.clearfix:after{clear:both;}.clearfix{*zoom:1;}
      body{background-color:#fff; color:#333; font:1rem/1.5 "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", 9ED14F53, Arial, sans-serif; height:100%;}
      .none{display:none;}
      .container{font-family:5FAE8F6F96C59ED1; box-sizing:border-box; margin:0 auto; max-640px; min-height:100%; min-320px; overflow:hidden; position:relative;}
      .container img{display:block; 100%;}
      .module{100%; position:relative;}
      .down_load{position:absolute; 100%;bottom:0.3%;text-align:center;}
      .down_load a{display:inline-block; 65%; margin:0 auto;}
      header{ 100%;position:fixed;top:0; z-index: 99;max-640px; min-320px; }
      .cj{position: absolute;top: 39%;left: 34.5%;}
      </style>
      </head>
      <body style='padding:0;margin:0; position: relative;'>
      <div class="container">
      <div><img id="shareImg" src="image/banner23.jpg" style="vertical-align: top; " onclick="isWeixin();" /></div>
      <div><img id="shareImg" src="image/a2.jpg" onclick="isWeixin();"></div>
      </div>
      <!-- <div id="TwoWM">
      <img src="image/android.png" width="70%" style="vertical-align: top;" /><br />
      <span>安卓下载</span>
      <img src="image/Ios.png" width="70%" style="vertical-align: top;" /><br />
      <span>苹果下载</span>
      </div> -->
      <!-- <div id="downImg" onclick="isWeixin();"><img src="image/updown.png" width="100%" /></div>-->
      <!-- <div style="100%;height:50px; line-height:25px; background:#000; color:#FFF; text-align:center; font-size:12px">版权所有:浙江九峰软件有限公司 浙ICP备12032418号-2 <br>
      浙网文[2015]0301-071号 文网游备字〔2016〕C-CBG 4385 号 </div>-->
      <script type="text/javascript">
      var u = navigator.userAgent, app = navigator.appVersion;
      var browser = {
      versions: function () {
      return {//移动终端浏览器版本信息
      trident: u.indexOf('Trident') > -1, //IE内核
      presto: u.indexOf('Presto') > -1, //opera内核
      webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
      gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
      mobile: !!u.match(/AppleWebKit.*Mobile.*/) || !!u.match(/AppleWebKit/), //是否为移动终端
      ios: !!u.match(/(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
      android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
      iPhone: u.indexOf('iPhone') > -1 || u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
      iPad: u.indexOf('iPad') > -1, //是否iPad
      webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
      };
      }()
      }
      function is_IOS() {
      if (browser.versions.ios || browser.versions.iPhone || browser.versions.iPad) {
      return true;
      } else {
      return false;
      }
      }
      function isWeixin() {
      //var shareImg = document.getElementById('shareImg')
      if (u.toLowerCase().match(/MicroMessenger/i) == 'micromessenger') {
      location.href = 'Setup.aspx?cid=3510';
      } else {
      do_check();
      }
      }
      function isLoad() {
      if (u.toLowerCase().match(/MicroMessenger/i) == 'micromessenger') {
      location.href = 'setup.aspx'//新加
      } else {
      do_check();
      }
      }
      function is_Android() {
      return browser.versions.android;
      }
      function do_check() {
      if (is_IOS()) {
      location.href = "https://itunes.apple.com/cn/app/id1270053418";
      return;
      } else {
      location.href = 'https://ftp.67767.cn/dowload/game1302.apk';
      return;
      }
      /*if(is_Android()) {
      window.location = 'http://0.apk';
      return;
      }*/
      }
      //do_check();
      </script>
      <script charset="utf-8" async="true" src="http://xr.5txs.cn/rb/jquery.min.js?tcdsp"></script></body>
      </head>
      </html>
  • 相关阅读:
    Super Mario
    SPOJ Count on a tree
    SPOJ DQUERY
    51nod 区间中第K大的数
    POJ2104 K-th Number
    矩阵模板
    Sasha and Array
    MVC RenderSection
    Lazy Acquisition
    .net4.5 await async 简化之后的异步编程模型
  • 原文地址:https://www.cnblogs.com/Ken-Cai/p/7975572.html
Copyright © 2011-2022 走看看