根据浏览器判断是下载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 {width: 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", \9ED1\4F53, Arial, sans-serif; height:100%;}
 .none{display:none;}
 .container{font-family:\5FAE\8F6F\96C5\9ED1; box-sizing:border-box; margin:0 auto; max-width:640px; min-height:100%; min-width:320px; overflow:hidden; position:relative;}
 .container img{display:block; width:100%;}
 .module{width:100%; position:relative;}
 .down_load{position:absolute; width:100%;bottom:0.3%;text-align:center;}
 .down_load a{display:inline-block; width:65%; margin:0 auto;}
 header{width: 100%;position:fixed;top:0; z-index: 99;max-width:640px; min-width: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; " οnclick="isWeixin();" /></div>
 <div><img id="shareImg" src="image/a2.jpg" οnclick="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" οnclick="isWeixin();"><img src="image/updown.png" width="100%" /></div>-->
 <!-- <div style="width: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>

转载于:https://www.cnblogs.com/Ken-Cai/p/7975572.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值