zoukankan      html  css  js  c++  java
  • APP自识别安卓苹果

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>XX-APP</title>
    <meta name="viewport" content="width=device-width,maximum-scale=1,target-densitydpi=320,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta http-equiv="x-dns-prefetch-control" content="off">
    <style type="text/css">
    body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,button,textarea,p,blockquote,th,td {-webkit-text-size-adjust:none;margin:0;padding: 0;}fieldset,img,html,body,iframe{border:0;}
    </style>
    </head>
     
    <body style="background:#e8e8e8;">
    <img style="display:none;100%;" id="tip" src="images/tip.jpg">
    <script type="text/javascript">
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf('micromessenger') > 0) {
                    document.getElementById('tip').style.display = 'block';
    }else if (ua.indexOf('mobile') > 0) {
    if (ua.indexOf('android') > 0) {
    location.href = "安卓下载地址?rand="+Math.floor(Math.random()*(1000+1));
    } else{
                    location.href="苹果商店下载地址";
    }
    } else{
    location.href="安卓下载地址?rand="+Math.floor(Math.random()*(1000+1));
    };
    </script>
            <script type="text/javascript" src="images/jquery.js">
    </body>
    </html>
     
  • 相关阅读:
    HTML5和HTML4之间的区别
    HttpRequest信息内容介绍
    Spring Web MVC处理请求的流程
    游戏中的路径动画设计与实现
    Python基本数据类型
    Python基本数据类型
    perl .= 操作符
    出差二、三事——北漂18年(25)
    perl 卸载Oracle数据库
    perl 卸载mysql数据库
  • 原文地址:https://www.cnblogs.com/oldking/p/6728259.html
Copyright © 2011-2022 走看看