zoukankan      html  css  js  c++  java
  • 支付宝的kill-ie

    支付宝首页改版了,新首页很漂亮,可是对于老版本IE用户怎么办,支付宝是这么做的!

    1 <!--[if lte IE 7]>
    2   <script type="text/javascript">
    3     window.location.href = 'https://www.alipay.com/x/kill-ie.htm';
    4   </script>
    5 <![endif]-->

    下面是支付宝用的css reset样式:

     1 /* reset样式 */
     2 
     3 html{color:#000;background:#fff;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}
     4 body{margin:0;padding:0;font:12px/1.5 tahoma,arial,"Hiragino Sans GB","Microsoft Yahei","5b8b4f53";min-width:1000px;}
     5 *{margin:0;padding:0}
     6 ul{list-style:none}
     7 h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:500}
     8 a,a:link,a:hover,a:active{color:#000;}
     9 a:hover{text-decoration:none;border-bottom:1px solid #000;}
    10 ins,a{text-decoration:none}
    11 .clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}
    12 .clearfix{zoom:1}
    13 
    14 /* 结束reset样式 */

    操作cookie的方法:

     1 <script>
     2               (function () {
     3                    var Cookie = {
     4                   get: function (name) {
     5                     var name = name + "=";
     6                     var ca = document.cookie.split(';');
     7                     for(var i=0; i<ca.length; i++) {
     8                         var c = ca[i];
     9                         while (c.charAt(0)==' ') c = c.substring(1);
    10                         if (c.indexOf(name) != -1) return c.substring(name.length, c.length);
    11                     }
    12                     return "";
    13                   },
    14                   remove: function (name,path,domain) {
    15                       if (this.get(name)) {
    16                           document.cookie = name + "=" 
    17                           + ((path) ? "; path=" + path : "") 
    18                           + ((domain) ? "; domain=" + domain : "") 
    19                           + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    20                       }
    21                   }
    22                 };
    23                 
    24                 document.getElementById("linkReturnOldVersion").onclick = function () {
    25                   Cookie.remove('NEW_ALIPAY_HOME', '/', 'alipay.com');
    26                   location.href = '//my.alipay.com/portal/i.htm';
    27                 };
    28               })();
    29              
    30             </script>

    恩,就这样!

  • 相关阅读:
    [bzoj1731] [Usaco2005 dec]Layout 排队布局
    [bzoj1914] [Usaco2010 OPen]Triangle Counting 数三角形
    [bzoj1774] [Usaco2009 Dec]Toll 过路费
    [bzoj1783] [Usaco2010 Jan]Taking Turns
    [bzoj1705] [Usaco2007 Nov]Telephone Wire 架设电话线
    [bzoj1700]: [Usaco2007 Jan]Problem Solving 解题
    定时启动任务
    数据库表转javaBean
    验证码的生成
    MD5加密与验证
  • 原文地址:https://www.cnblogs.com/newh5/p/5048134.html
Copyright © 2011-2022 走看看